🎉 initiate project *astro_rewrite*
This commit is contained in:
parent
ffd4d5e86c
commit
2ba37bfbe3
8658 changed files with 2268794 additions and 2538 deletions
6
node_modules/astro/dist/cli/telemetry/index.d.ts
generated
vendored
Normal file
6
node_modules/astro/dist/cli/telemetry/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
import type yargs from 'yargs-parser';
|
||||
interface TelemetryOptions {
|
||||
flags: yargs.Arguments;
|
||||
}
|
||||
export declare function update(subcommand: string, { flags }: TelemetryOptions): Promise<void>;
|
||||
export {};
|
39
node_modules/astro/dist/cli/telemetry/index.js
generated
vendored
Normal file
39
node_modules/astro/dist/cli/telemetry/index.js
generated
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
import * as msg from "../../core/messages.js";
|
||||
import { telemetry } from "../../events/index.js";
|
||||
async function update(subcommand, { flags }) {
|
||||
const isValid = ["enable", "disable", "reset"].includes(subcommand);
|
||||
if (flags.help || flags.h || !isValid) {
|
||||
msg.printHelp({
|
||||
commandName: "astro telemetry",
|
||||
usage: "[command]",
|
||||
tables: {
|
||||
Commands: [
|
||||
["enable", "Enable anonymous data collection."],
|
||||
["disable", "Disable anonymous data collection."],
|
||||
["reset", "Reset anonymous data collection settings."]
|
||||
]
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
switch (subcommand) {
|
||||
case "enable": {
|
||||
telemetry.setEnabled(true);
|
||||
console.log(msg.telemetryEnabled());
|
||||
return;
|
||||
}
|
||||
case "disable": {
|
||||
telemetry.setEnabled(false);
|
||||
console.log(msg.telemetryDisabled());
|
||||
return;
|
||||
}
|
||||
case "reset": {
|
||||
telemetry.clear();
|
||||
console.log(msg.telemetryReset());
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
export {
|
||||
update
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue