@objectstack/cli 4.0.4 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -25
- package/dist/commands/build.d.ts +5 -0
- package/dist/commands/build.d.ts.map +1 -0
- package/dist/commands/build.js +6 -0
- package/dist/commands/build.js.map +1 -0
- package/dist/commands/cloud/login.d.ts +16 -0
- package/dist/commands/cloud/login.d.ts.map +1 -0
- package/dist/commands/cloud/login.js +166 -0
- package/dist/commands/cloud/login.js.map +1 -0
- package/dist/commands/cloud/logout.d.ts +15 -0
- package/dist/commands/cloud/logout.d.ts.map +1 -0
- package/dist/commands/cloud/logout.js +51 -0
- package/dist/commands/cloud/logout.js.map +1 -0
- package/dist/commands/cloud/whoami.d.ts +15 -0
- package/dist/commands/cloud/whoami.d.ts.map +1 -0
- package/dist/commands/cloud/whoami.js +81 -0
- package/dist/commands/cloud/whoami.js.map +1 -0
- package/dist/commands/compile.d.ts +3 -0
- package/dist/commands/compile.d.ts.map +1 -1
- package/dist/commands/compile.js +128 -6
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/create.js +1 -1
- package/dist/commands/data/create.js +2 -2
- package/dist/commands/data/create.js.map +1 -1
- package/dist/commands/data/delete.js +2 -2
- package/dist/commands/data/delete.js.map +1 -1
- package/dist/commands/data/get.js +2 -2
- package/dist/commands/data/get.js.map +1 -1
- package/dist/commands/data/query.js +2 -2
- package/dist/commands/data/query.js.map +1 -1
- package/dist/commands/data/update.js +2 -2
- package/dist/commands/data/update.js.map +1 -1
- package/dist/commands/dev.d.ts +9 -0
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +116 -22
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/generate.js +9 -9
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/i18n/check.d.ts +18 -0
- package/dist/commands/i18n/check.d.ts.map +1 -0
- package/dist/commands/i18n/check.js +153 -0
- package/dist/commands/i18n/check.js.map +1 -0
- package/dist/commands/init.js +2 -2
- package/dist/commands/lint.d.ts +3 -0
- package/dist/commands/lint.d.ts.map +1 -1
- package/dist/commands/lint.js +24 -0
- package/dist/commands/lint.js.map +1 -1
- package/dist/commands/login.d.ts +17 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +313 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logout.d.ts.map +1 -0
- package/dist/commands/{auth/logout.js → logout.js} +14 -2
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/meta/delete.js +2 -2
- package/dist/commands/meta/delete.js.map +1 -1
- package/dist/commands/meta/get.js +2 -2
- package/dist/commands/meta/get.js.map +1 -1
- package/dist/commands/meta/list.js +2 -2
- package/dist/commands/meta/list.js.map +1 -1
- package/dist/commands/meta/register.js +2 -2
- package/dist/commands/meta/register.js.map +1 -1
- package/dist/commands/package/publish.d.ts +32 -0
- package/dist/commands/package/publish.d.ts.map +1 -0
- package/dist/commands/package/publish.js +324 -0
- package/dist/commands/package/publish.js.map +1 -0
- package/dist/commands/projects/bind.d.ts +30 -0
- package/dist/commands/projects/bind.d.ts.map +1 -0
- package/dist/commands/projects/bind.js +132 -0
- package/dist/commands/projects/bind.js.map +1 -0
- package/dist/commands/projects/create.d.ts +28 -0
- package/dist/commands/projects/create.d.ts.map +1 -0
- package/dist/commands/projects/create.js +120 -0
- package/dist/commands/projects/create.js.map +1 -0
- package/dist/commands/projects/list.d.ts +21 -0
- package/dist/commands/projects/list.d.ts.map +1 -0
- package/dist/commands/projects/list.js +79 -0
- package/dist/commands/projects/list.js.map +1 -0
- package/dist/commands/projects/projects.test.d.ts +2 -0
- package/dist/commands/projects/projects.test.d.ts.map +1 -0
- package/dist/commands/projects/projects.test.js +56 -0
- package/dist/commands/projects/projects.test.js.map +1 -0
- package/dist/commands/projects/show.d.ts +21 -0
- package/dist/commands/projects/show.d.ts.map +1 -0
- package/dist/commands/projects/show.js +72 -0
- package/dist/commands/projects/show.js.map +1 -0
- package/dist/commands/projects/switch.d.ts +24 -0
- package/dist/commands/projects/switch.d.ts.map +1 -0
- package/dist/commands/projects/switch.js +64 -0
- package/dist/commands/projects/switch.js.map +1 -0
- package/dist/commands/publish.d.ts +17 -0
- package/dist/commands/publish.d.ts.map +1 -0
- package/dist/commands/publish.js +135 -0
- package/dist/commands/publish.js.map +1 -0
- package/dist/commands/{auth/login.d.ts → register.d.ts} +3 -2
- package/dist/commands/register.d.ts.map +1 -0
- package/dist/commands/{auth/login.js → register.js} +44 -61
- package/dist/commands/register.js.map +1 -0
- package/dist/commands/rollback.d.ts +13 -0
- package/dist/commands/rollback.d.ts.map +1 -0
- package/dist/commands/rollback.js +77 -0
- package/dist/commands/rollback.js.map +1 -0
- package/dist/commands/serve.d.ts +22 -0
- package/dist/commands/serve.d.ts.map +1 -1
- package/dist/commands/serve.js +1173 -58
- package/dist/commands/serve.js.map +1 -1
- package/dist/commands/start.d.ts +18 -0
- package/dist/commands/start.d.ts.map +1 -0
- package/dist/commands/start.js +112 -0
- package/dist/commands/start.js.map +1 -0
- package/dist/commands/whoami.d.ts.map +1 -0
- package/dist/commands/{auth/whoami.js → whoami.js} +5 -5
- package/dist/commands/whoami.js.map +1 -0
- package/dist/index.d.ts +11 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -5
- package/dist/index.js.map +1 -1
- package/dist/utils/account.d.ts +31 -0
- package/dist/utils/account.d.ts.map +1 -0
- package/dist/utils/account.js +154 -0
- package/dist/utils/account.js.map +1 -0
- package/dist/utils/api-client.d.ts +10 -4
- package/dist/utils/api-client.d.ts.map +1 -1
- package/dist/utils/api-client.js +13 -7
- package/dist/utils/api-client.js.map +1 -1
- package/dist/utils/auth-config.d.ts +6 -0
- package/dist/utils/auth-config.d.ts.map +1 -1
- package/dist/utils/auth-config.js.map +1 -1
- package/dist/utils/auth-flows.d.ts +31 -0
- package/dist/utils/auth-flows.d.ts.map +1 -0
- package/dist/utils/auth-flows.js +151 -0
- package/dist/utils/auth-flows.js.map +1 -0
- package/dist/utils/build-runtime.d.ts +45 -0
- package/dist/utils/build-runtime.d.ts.map +1 -0
- package/dist/utils/build-runtime.js +154 -0
- package/dist/utils/build-runtime.js.map +1 -0
- package/dist/utils/cloud-config.d.ts +24 -0
- package/dist/utils/cloud-config.d.ts.map +1 -0
- package/dist/utils/cloud-config.js +75 -0
- package/dist/utils/cloud-config.js.map +1 -0
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +17 -2
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/console.d.ts +33 -0
- package/dist/utils/console.d.ts.map +1 -0
- package/dist/utils/console.js +172 -0
- package/dist/utils/console.js.map +1 -0
- package/dist/utils/extract-hook-body.d.ts +13 -0
- package/dist/utils/extract-hook-body.d.ts.map +1 -0
- package/dist/utils/extract-hook-body.js +175 -0
- package/dist/utils/extract-hook-body.js.map +1 -0
- package/dist/utils/format.d.ts +8 -0
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/format.js +15 -2
- package/dist/utils/format.js.map +1 -1
- package/dist/utils/i18n-coverage.d.ts +61 -0
- package/dist/utils/i18n-coverage.d.ts.map +1 -0
- package/dist/utils/i18n-coverage.js +176 -0
- package/dist/utils/i18n-coverage.js.map +1 -0
- package/dist/utils/lower-callables.d.ts +17 -0
- package/dist/utils/lower-callables.d.ts.map +1 -0
- package/dist/utils/lower-callables.js +181 -0
- package/dist/utils/lower-callables.js.map +1 -0
- package/dist/utils/plugin-detection.d.ts +1 -0
- package/dist/utils/plugin-detection.d.ts.map +1 -1
- package/dist/utils/plugin-detection.js +41 -0
- package/dist/utils/plugin-detection.js.map +1 -1
- package/dist/utils/studio.d.ts +1 -0
- package/dist/utils/studio.d.ts.map +1 -1
- package/dist/utils/studio.js +24 -9
- package/dist/utils/studio.js.map +1 -1
- package/package.json +60 -22
- package/.turbo/turbo-build.log +0 -4
- package/CHANGELOG.md +0 -821
- package/bin/run-dev.js +0 -5
- package/dist/commands/auth/login.d.ts.map +0 -1
- package/dist/commands/auth/login.js.map +0 -1
- package/dist/commands/auth/logout.d.ts.map +0 -1
- package/dist/commands/auth/logout.js.map +0 -1
- package/dist/commands/auth/whoami.d.ts.map +0 -1
- package/dist/commands/auth/whoami.js.map +0 -1
- package/dist/commands/codemod/v2-to-v3.d.ts +0 -10
- package/dist/commands/codemod/v2-to-v3.d.ts.map +0 -1
- package/dist/commands/codemod/v2-to-v3.js +0 -145
- package/dist/commands/codemod/v2-to-v3.js.map +0 -1
- package/dist/commands/plugin/add.d.ts +0 -22
- package/dist/commands/plugin/add.d.ts.map +0 -1
- package/dist/commands/plugin/add.js +0 -93
- package/dist/commands/plugin/add.js.map +0 -1
- package/dist/commands/plugin/build.d.ts +0 -29
- package/dist/commands/plugin/build.d.ts.map +0 -1
- package/dist/commands/plugin/build.js +0 -170
- package/dist/commands/plugin/build.js.map +0 -1
- package/dist/commands/plugin/info.d.ts +0 -10
- package/dist/commands/plugin/info.d.ts.map +0 -1
- package/dist/commands/plugin/info.js +0 -65
- package/dist/commands/plugin/info.js.map +0 -1
- package/dist/commands/plugin/list.d.ts +0 -13
- package/dist/commands/plugin/list.d.ts.map +0 -1
- package/dist/commands/plugin/list.js +0 -78
- package/dist/commands/plugin/list.js.map +0 -1
- package/dist/commands/plugin/publish.d.ts +0 -27
- package/dist/commands/plugin/publish.d.ts.map +0 -1
- package/dist/commands/plugin/publish.js +0 -152
- package/dist/commands/plugin/publish.js.map +0 -1
- package/dist/commands/plugin/remove.d.ts +0 -20
- package/dist/commands/plugin/remove.d.ts.map +0 -1
- package/dist/commands/plugin/remove.js +0 -79
- package/dist/commands/plugin/remove.js.map +0 -1
- package/dist/commands/plugin/validate.d.ts +0 -23
- package/dist/commands/plugin/validate.d.ts.map +0 -1
- package/dist/commands/plugin/validate.js +0 -251
- package/dist/commands/plugin/validate.js.map +0 -1
- package/src/bin.ts +0 -13
- package/src/commands/auth/login.ts +0 -188
- package/src/commands/auth/logout.ts +0 -51
- package/src/commands/auth/whoami.ts +0 -85
- package/src/commands/codemod/v2-to-v3.ts +0 -171
- package/src/commands/compile.ts +0 -114
- package/src/commands/create.ts +0 -281
- package/src/commands/data/create.ts +0 -110
- package/src/commands/data/delete.ts +0 -84
- package/src/commands/data/get.ts +0 -84
- package/src/commands/data/query.ts +0 -127
- package/src/commands/data/update.ts +0 -114
- package/src/commands/dev.ts +0 -83
- package/src/commands/diff.ts +0 -294
- package/src/commands/doctor.ts +0 -572
- package/src/commands/explain.ts +0 -412
- package/src/commands/generate.ts +0 -924
- package/src/commands/info.ts +0 -124
- package/src/commands/init.ts +0 -327
- package/src/commands/lint.ts +0 -315
- package/src/commands/meta/delete.ts +0 -79
- package/src/commands/meta/get.ts +0 -73
- package/src/commands/meta/list.ts +0 -105
- package/src/commands/meta/register.ts +0 -97
- package/src/commands/plugin/add.ts +0 -112
- package/src/commands/plugin/build.ts +0 -193
- package/src/commands/plugin/info.ts +0 -79
- package/src/commands/plugin/list.ts +0 -93
- package/src/commands/plugin/publish.ts +0 -176
- package/src/commands/plugin/remove.ts +0 -97
- package/src/commands/plugin/validate.ts +0 -268
- package/src/commands/serve.ts +0 -411
- package/src/commands/studio.ts +0 -52
- package/src/commands/test.ts +0 -135
- package/src/commands/validate.ts +0 -143
- package/src/index.ts +0 -22
- package/src/utils/api-client.ts +0 -88
- package/src/utils/auth-config.ts +0 -107
- package/src/utils/config.ts +0 -80
- package/src/utils/format.ts +0 -267
- package/src/utils/output-formatter.ts +0 -91
- package/src/utils/plugin-detection.ts +0 -16
- package/src/utils/plugin-helpers.ts +0 -37
- package/src/utils/studio.ts +0 -350
- package/test/commands.test.ts +0 -128
- package/test/create.test.ts +0 -25
- package/test/plugin-commands.test.ts +0 -44
- package/test/plugin.test.ts +0 -169
- package/test/remote-api-commands.test.ts +0 -188
- package/test/remote-api-utils.test.ts +0 -196
- package/test/serve-host-config.test.ts +0 -77
- package/tsconfig.build.json +0 -20
- package/tsconfig.json +0 -25
- package/tsup.config.ts +0 -23
- /package/dist/commands/{auth/logout.d.ts → logout.d.ts} +0 -0
- /package/dist/commands/{auth/whoami.d.ts → whoami.d.ts} +0 -0
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
|
|
2
|
-
import { Args, Command } from '@oclif/core';
|
|
3
|
-
import chalk from 'chalk';
|
|
4
|
-
import { loadConfig } from '../../utils/config.js';
|
|
5
|
-
import { printHeader, printError, printInfo, printKV } from '../../utils/format.js';
|
|
6
|
-
import { resolvePluginName, resolvePluginVersion, resolvePluginType } from '../../utils/plugin-helpers.js';
|
|
7
|
-
export default class PluginInfo extends Command {
|
|
8
|
-
static description = 'Show detailed information about a plugin';
|
|
9
|
-
static args = {
|
|
10
|
-
name: Args.string({ description: 'Plugin name or package name', required: true }),
|
|
11
|
-
config: Args.string({ description: 'Configuration file path', required: false }),
|
|
12
|
-
};
|
|
13
|
-
async run() {
|
|
14
|
-
const { args } = await this.parse(PluginInfo);
|
|
15
|
-
try {
|
|
16
|
-
const { config } = await loadConfig(args.config);
|
|
17
|
-
const allPlugins = [
|
|
18
|
-
...(config.plugins || []),
|
|
19
|
-
...(config.devPlugins || []),
|
|
20
|
-
];
|
|
21
|
-
const found = allPlugins.find((p) => {
|
|
22
|
-
const pName = resolvePluginName(p);
|
|
23
|
-
return pName === args.name || pName.includes(args.name);
|
|
24
|
-
});
|
|
25
|
-
if (!found) {
|
|
26
|
-
printError(`Plugin '${args.name}' not found in configuration`);
|
|
27
|
-
console.log('');
|
|
28
|
-
console.log(chalk.dim(' Available plugins:'));
|
|
29
|
-
for (const p of allPlugins) {
|
|
30
|
-
console.log(chalk.dim(` - ${resolvePluginName(p)}`));
|
|
31
|
-
}
|
|
32
|
-
console.log('');
|
|
33
|
-
this.exit(1);
|
|
34
|
-
}
|
|
35
|
-
printHeader(`Plugin: ${resolvePluginName(found)}`);
|
|
36
|
-
printKV('Name', resolvePluginName(found));
|
|
37
|
-
printKV('Version', resolvePluginVersion(found));
|
|
38
|
-
printKV('Type', resolvePluginType(found));
|
|
39
|
-
const isDev = (config.devPlugins || []).includes(found);
|
|
40
|
-
printKV('Environment', isDev ? 'development' : 'production');
|
|
41
|
-
if (found && typeof found === 'object') {
|
|
42
|
-
const p = found;
|
|
43
|
-
if (typeof p.description === 'string') {
|
|
44
|
-
printKV('Description', p.description);
|
|
45
|
-
}
|
|
46
|
-
if (Array.isArray(p.dependencies) && p.dependencies.length > 0) {
|
|
47
|
-
printKV('Dependencies', p.dependencies.join(', '));
|
|
48
|
-
}
|
|
49
|
-
// Show services if it's a loaded plugin instance
|
|
50
|
-
if (typeof p.init === 'function') {
|
|
51
|
-
printInfo('This is a runtime plugin instance (has init function)');
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
if (typeof found === 'string') {
|
|
55
|
-
printInfo('This is a string reference (will be imported at runtime)');
|
|
56
|
-
}
|
|
57
|
-
console.log('');
|
|
58
|
-
}
|
|
59
|
-
catch (error) {
|
|
60
|
-
printError(error.message || String(error));
|
|
61
|
-
this.exit(1);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
//# sourceMappingURL=info.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../../src/commands/plugin/info.ts"],"names":[],"mappings":"AAAA,yEAAyE;AAEzE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAE3G,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,OAAO;IAC7C,MAAM,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AuD,CAAC,CAAC;gBACrE,CAAC;YACH,CAAC;YAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;gBAC9B,SAAS,CAAC,0DAA0D,CAAC,CAAC;YACxE,CAAC;YAED,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAClB,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,UAAU,CAAC,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAC3C,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACf,CAAC;IACH,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Command } from '@oclif/core';
|
|
2
|
-
export default class PluginList extends Command {
|
|
3
|
-
static description: string;
|
|
4
|
-
static aliases: string[];
|
|
5
|
-
static args: {
|
|
6
|
-
config: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
7
|
-
};
|
|
8
|
-
static flags: {
|
|
9
|
-
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
-
};
|
|
11
|
-
run(): Promise<void>;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=list.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/plugin/list.ts"],"names":[],"mappings":"AAEA,OAAO,EAAQ,OAAO,EAAS,MAAM,aAAa,CAAC;AAMnD,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,OAAO;IAC7C,OAAgB,WAAW,SAA+C;IAE1E,OAAgB,OAAO,WAAiB;IAExC,OAAgB,IAAI;;MAElB;IAEF,OAAgB,KAAK;;MAEnB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAuE3B"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
|
|
2
|
-
import { Args, Command, Flags } from '@oclif/core';
|
|
3
|
-
import chalk from 'chalk';
|
|
4
|
-
import { loadConfig } from '../../utils/config.js';
|
|
5
|
-
import { printHeader, printInfo, printError } from '../../utils/format.js';
|
|
6
|
-
import { resolvePluginName, resolvePluginVersion, resolvePluginType } from '../../utils/plugin-helpers.js';
|
|
7
|
-
export default class PluginList extends Command {
|
|
8
|
-
static description = 'List plugins defined in the configuration';
|
|
9
|
-
static aliases = ['plugin ls'];
|
|
10
|
-
static args = {
|
|
11
|
-
config: Args.string({ description: 'Configuration file path', required: false }),
|
|
12
|
-
};
|
|
13
|
-
static flags = {
|
|
14
|
-
json: Flags.boolean({ description: 'Output as JSON' }),
|
|
15
|
-
};
|
|
16
|
-
async run() {
|
|
17
|
-
const { args, flags } = await this.parse(PluginList);
|
|
18
|
-
try {
|
|
19
|
-
const { config } = await loadConfig(args.config);
|
|
20
|
-
const plugins = config.plugins || [];
|
|
21
|
-
const devPlugins = config.devPlugins || [];
|
|
22
|
-
if (flags.json) {
|
|
23
|
-
const data = {
|
|
24
|
-
plugins: plugins.map(p => ({
|
|
25
|
-
name: resolvePluginName(p),
|
|
26
|
-
version: resolvePluginVersion(p),
|
|
27
|
-
type: resolvePluginType(p),
|
|
28
|
-
dev: false,
|
|
29
|
-
})),
|
|
30
|
-
devPlugins: devPlugins.map(p => ({
|
|
31
|
-
name: resolvePluginName(p),
|
|
32
|
-
version: resolvePluginVersion(p),
|
|
33
|
-
type: resolvePluginType(p),
|
|
34
|
-
dev: true,
|
|
35
|
-
})),
|
|
36
|
-
};
|
|
37
|
-
console.log(JSON.stringify(data, null, 2));
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
printHeader('Plugins');
|
|
41
|
-
if (plugins.length === 0 && devPlugins.length === 0) {
|
|
42
|
-
printInfo('No plugins configured');
|
|
43
|
-
console.log('');
|
|
44
|
-
console.log(chalk.dim(' Hint: Add plugins to your objectstack.config.ts'));
|
|
45
|
-
console.log(chalk.dim(' Or run: os plugin add <package-name>'));
|
|
46
|
-
console.log('');
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
if (plugins.length > 0) {
|
|
50
|
-
console.log(chalk.bold(`\n Plugins (${plugins.length}):`));
|
|
51
|
-
for (const plugin of plugins) {
|
|
52
|
-
const name = resolvePluginName(plugin);
|
|
53
|
-
const version = resolvePluginVersion(plugin);
|
|
54
|
-
const type = resolvePluginType(plugin);
|
|
55
|
-
console.log(` ${chalk.cyan('●')} ${chalk.white(name)}` +
|
|
56
|
-
(version !== '-' ? chalk.dim(` v${version}`) : '') +
|
|
57
|
-
(type !== 'standard' ? chalk.dim(` [${type}]`) : ''));
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
if (devPlugins.length > 0) {
|
|
61
|
-
console.log(chalk.bold(`\n Dev Plugins (${devPlugins.length}):`));
|
|
62
|
-
for (const plugin of devPlugins) {
|
|
63
|
-
const name = resolvePluginName(plugin);
|
|
64
|
-
const version = resolvePluginVersion(plugin);
|
|
65
|
-
console.log(` ${chalk.yellow('●')} ${chalk.white(name)}` +
|
|
66
|
-
(version !== '-' ? chalk.dim(` v${version}`) : '') +
|
|
67
|
-
chalk.dim(' [dev]'));
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
console.log('');
|
|
71
|
-
}
|
|
72
|
-
catch (error) {
|
|
73
|
-
printError(error.message || String(error));
|
|
74
|
-
this.exit(1);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
//# sourceMappingURL=list.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/plugin/list.ts"],"names":[],"mappings":"AAAA,yEAAyE;AAEzE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO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,CAAC;YAC3C,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACf,CAAC;IACH,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Command } from '@oclif/core';
|
|
2
|
-
/**
|
|
3
|
-
* Publish a plugin artifact to the ObjectStack marketplace.
|
|
4
|
-
*
|
|
5
|
-
* Validates the artifact locally (unless --skipValidation), computes the
|
|
6
|
-
* SHA-256 checksum, and uploads to the marketplace REST API.
|
|
7
|
-
*
|
|
8
|
-
* Architecture alignment: `npm publish`, `helm push`, `vsce publish`.
|
|
9
|
-
*/
|
|
10
|
-
export default class PluginPublish extends Command {
|
|
11
|
-
static description: string;
|
|
12
|
-
static args: {
|
|
13
|
-
artifact: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
14
|
-
};
|
|
15
|
-
static flags: {
|
|
16
|
-
registryUrl: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
-
token: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
-
releaseNotes: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
-
preRelease: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
20
|
-
skipValidation: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
21
|
-
access: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
-
tags: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
-
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
24
|
-
};
|
|
25
|
-
run(): Promise<void>;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=publish.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../src/commands/plugin/publish.ts"],"names":[],"mappings":"AAEA,OAAO,EAAQ,OAAO,EAAS,MAAM,aAAa,CAAC;AAOnD;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,OAAO;IAChD,OAAgB,WAAW,SAAkD;IAE7E,OAAgB,IAAI;;MAElB;IAEF,OAAgB,KAAK;;;;;;;;;MASnB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA4I3B"}
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
|
|
2
|
-
import { Args, Command, Flags } from '@oclif/core';
|
|
3
|
-
import chalk from 'chalk';
|
|
4
|
-
import path from 'path';
|
|
5
|
-
import fs from 'fs';
|
|
6
|
-
import crypto from 'crypto';
|
|
7
|
-
import { createTimer, printHeader, printKV, printStep, printSuccess, printError, printWarning, printInfo } from '../../utils/format.js';
|
|
8
|
-
/**
|
|
9
|
-
* Publish a plugin artifact to the ObjectStack marketplace.
|
|
10
|
-
*
|
|
11
|
-
* Validates the artifact locally (unless --skipValidation), computes the
|
|
12
|
-
* SHA-256 checksum, and uploads to the marketplace REST API.
|
|
13
|
-
*
|
|
14
|
-
* Architecture alignment: `npm publish`, `helm push`, `vsce publish`.
|
|
15
|
-
*/
|
|
16
|
-
export default class PluginPublish extends Command {
|
|
17
|
-
static description = 'Publish a plugin artifact to the marketplace';
|
|
18
|
-
static args = {
|
|
19
|
-
artifact: Args.string({ description: 'Path to the artifact file', required: true }),
|
|
20
|
-
};
|
|
21
|
-
static flags = {
|
|
22
|
-
registryUrl: Flags.string({ char: 'r', description: 'Marketplace API base URL', default: 'https://marketplace.objectstack.com/api/v1' }),
|
|
23
|
-
token: Flags.string({ char: 't', description: 'Authentication token', env: 'OBJECTSTACK_MARKETPLACE_TOKEN' }),
|
|
24
|
-
releaseNotes: Flags.string({ description: 'Release notes for this version' }),
|
|
25
|
-
preRelease: Flags.boolean({ description: 'Mark as a pre-release', default: false }),
|
|
26
|
-
skipValidation: Flags.boolean({ description: 'Skip local validation before publish', default: false }),
|
|
27
|
-
access: Flags.string({ description: 'Access level (public | restricted)', default: 'public', options: ['public', 'restricted'] }),
|
|
28
|
-
tags: Flags.string({ description: 'Comma-separated tags', multiple: true }),
|
|
29
|
-
json: Flags.boolean({ description: 'Output result as JSON' }),
|
|
30
|
-
};
|
|
31
|
-
async run() {
|
|
32
|
-
const { args, flags } = await this.parse(PluginPublish);
|
|
33
|
-
const timer = createTimer();
|
|
34
|
-
if (!flags.json) {
|
|
35
|
-
printHeader('Plugin Publish');
|
|
36
|
-
}
|
|
37
|
-
try {
|
|
38
|
-
const artifactPath = path.resolve(process.cwd(), args.artifact);
|
|
39
|
-
if (!fs.existsSync(artifactPath)) {
|
|
40
|
-
throw new Error(`Artifact not found: ${artifactPath}`);
|
|
41
|
-
}
|
|
42
|
-
if (!flags.token) {
|
|
43
|
-
throw new Error('Authentication token required. Set --token or OBJECTSTACK_MARKETPLACE_TOKEN environment variable.');
|
|
44
|
-
}
|
|
45
|
-
if (!flags.json) {
|
|
46
|
-
printKV('Artifact', path.relative(process.cwd(), artifactPath));
|
|
47
|
-
printKV('Registry', flags.registryUrl);
|
|
48
|
-
}
|
|
49
|
-
// 1. Read artifact
|
|
50
|
-
const artifactBuffer = fs.readFileSync(artifactPath);
|
|
51
|
-
const sha256 = crypto.createHash('sha256').update(artifactBuffer).digest('hex');
|
|
52
|
-
// 2. Extract manifest info
|
|
53
|
-
let manifest;
|
|
54
|
-
try {
|
|
55
|
-
manifest = JSON.parse(artifactBuffer.toString('utf-8'));
|
|
56
|
-
}
|
|
57
|
-
catch {
|
|
58
|
-
throw new Error('Artifact does not contain a valid JSON manifest');
|
|
59
|
-
}
|
|
60
|
-
const name = manifest.manifest?.name || manifest.name || 'unknown';
|
|
61
|
-
const version = manifest.manifest?.version || manifest.version || '0.0.0';
|
|
62
|
-
if (!flags.json) {
|
|
63
|
-
printKV('Package', `${name}@${version}`);
|
|
64
|
-
}
|
|
65
|
-
// 3. Local validation (unless skipped)
|
|
66
|
-
if (!flags.skipValidation) {
|
|
67
|
-
if (!flags.json)
|
|
68
|
-
printStep('Running local validation...');
|
|
69
|
-
if (artifactBuffer.length === 0) {
|
|
70
|
-
throw new Error('Artifact is empty — cannot publish');
|
|
71
|
-
}
|
|
72
|
-
const checksumFile = artifactPath + '.sha256';
|
|
73
|
-
if (fs.existsSync(checksumFile)) {
|
|
74
|
-
const expectedHash = fs.readFileSync(checksumFile, 'utf-8').trim().split(/\s+/)[0];
|
|
75
|
-
if (expectedHash !== sha256) {
|
|
76
|
-
throw new Error(`SHA-256 mismatch: artifact has changed since build`);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
if (!flags.json)
|
|
80
|
-
printSuccess('Local validation passed');
|
|
81
|
-
}
|
|
82
|
-
// 4. Upload to marketplace
|
|
83
|
-
if (!flags.json)
|
|
84
|
-
printStep('Uploading to marketplace...');
|
|
85
|
-
const uploadUrl = `${flags.registryUrl}/packages/upload`;
|
|
86
|
-
const tags = flags.tags?.flatMap(t => t.split(',')) || [];
|
|
87
|
-
const uploadPayload = {
|
|
88
|
-
packageName: name,
|
|
89
|
-
version,
|
|
90
|
-
sha256,
|
|
91
|
-
size: artifactBuffer.length,
|
|
92
|
-
preRelease: flags.preRelease,
|
|
93
|
-
access: flags.access,
|
|
94
|
-
releaseNotes: flags.releaseNotes,
|
|
95
|
-
tags,
|
|
96
|
-
};
|
|
97
|
-
// Perform HTTP upload
|
|
98
|
-
const response = await fetch(uploadUrl, {
|
|
99
|
-
method: 'POST',
|
|
100
|
-
headers: {
|
|
101
|
-
'Content-Type': 'application/json',
|
|
102
|
-
'Authorization': `Bearer ${flags.token}`,
|
|
103
|
-
},
|
|
104
|
-
body: JSON.stringify(uploadPayload),
|
|
105
|
-
});
|
|
106
|
-
if (!response.ok) {
|
|
107
|
-
const errorBody = await response.text().catch(() => 'Unknown error');
|
|
108
|
-
throw new Error(`Marketplace upload failed (${response.status}): ${errorBody}`);
|
|
109
|
-
}
|
|
110
|
-
const responseData = await response.json().catch(() => ({}));
|
|
111
|
-
const result = {
|
|
112
|
-
success: true,
|
|
113
|
-
packageId: responseData.packageId || name,
|
|
114
|
-
version,
|
|
115
|
-
artifactUrl: responseData.artifactUrl,
|
|
116
|
-
sha256,
|
|
117
|
-
submissionId: responseData.submissionId,
|
|
118
|
-
message: `Published ${name}@${version} to marketplace`,
|
|
119
|
-
};
|
|
120
|
-
if (flags.json) {
|
|
121
|
-
console.log(JSON.stringify(result, null, 2));
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
console.log('');
|
|
125
|
-
printSuccess(`Published ${chalk.cyan(`${name}@${version}`)}`);
|
|
126
|
-
console.log('');
|
|
127
|
-
printKV('SHA-256', sha256.slice(0, 16) + '...');
|
|
128
|
-
printKV('Size', `${(artifactBuffer.length / 1024).toFixed(1)} KB`);
|
|
129
|
-
if (result.artifactUrl) {
|
|
130
|
-
printKV('URL', result.artifactUrl);
|
|
131
|
-
}
|
|
132
|
-
if (result.submissionId) {
|
|
133
|
-
printKV('Submission', result.submissionId);
|
|
134
|
-
}
|
|
135
|
-
if (flags.preRelease) {
|
|
136
|
-
printWarning('Published as pre-release');
|
|
137
|
-
}
|
|
138
|
-
console.log('');
|
|
139
|
-
printInfo(`Duration: ${timer.display()}`);
|
|
140
|
-
console.log('');
|
|
141
|
-
}
|
|
142
|
-
catch (error) {
|
|
143
|
-
if (flags.json) {
|
|
144
|
-
console.log(JSON.stringify({ success: false, errorMessage: error.message }));
|
|
145
|
-
this.exit(1);
|
|
146
|
-
}
|
|
147
|
-
printError(error.message || String(error));
|
|
148
|
-
this.exit(1);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
//# sourceMappingURL=publish.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../src/commands/plugin/publish.ts"],"names":[],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M,CAAC,YAAY,EAAE,CAAC;gBACxB,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;YAC7C,CAAC;YAED,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;gBACrB,YAAY,CAAC,0BAA0B,CAAC,CAAC;YAC3C,CAAC;YAED,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAChB,SAAS,CAAC,aAAa,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YAC1C,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAClB,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;gBACf,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;gBAC7E,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACf,CAAC;YACD,UAAU,CAAC,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAC3C,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACf,CAAC;IACH,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Command } from '@oclif/core';
|
|
2
|
-
/**
|
|
3
|
-
* Remove a plugin reference from objectstack.config.ts.
|
|
4
|
-
*
|
|
5
|
-
* Removes matching import line and the entry from the plugins array.
|
|
6
|
-
*/
|
|
7
|
-
declare function removePluginFromConfig(configPath: string, pluginName: string): void;
|
|
8
|
-
export { removePluginFromConfig };
|
|
9
|
-
export default class PluginRemove extends Command {
|
|
10
|
-
static description: string;
|
|
11
|
-
static aliases: string[];
|
|
12
|
-
static args: {
|
|
13
|
-
name: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
14
|
-
};
|
|
15
|
-
static flags: {
|
|
16
|
-
config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
-
};
|
|
18
|
-
run(): Promise<void>;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=remove.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../src/commands/plugin/remove.ts"],"names":[],"mappings":"AAEA,OAAO,EAAQ,OAAO,EAAS,MAAM,aAAa,CAAC;AAWnD;;;;GAIG;AACH,iBAAS,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAuC5E;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,OAAO;IAC/C,OAAgB,WAAW,SAAgD;IAE3E,OAAgB,OAAO,WAAiB;IAExC,OAAgB,IAAI;;MAElB;IAEF,OAAgB,KAAK;;MAEnB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAsB3B"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
|
|
2
|
-
import { Args, Command, Flags } from '@oclif/core';
|
|
3
|
-
import chalk from 'chalk';
|
|
4
|
-
import fs from 'fs';
|
|
5
|
-
import path from 'path';
|
|
6
|
-
import { resolveConfigPath } from '../../utils/config.js';
|
|
7
|
-
import { printHeader, printSuccess, printError } from '../../utils/format.js';
|
|
8
|
-
function escapeRegex(str) {
|
|
9
|
-
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Remove a plugin reference from objectstack.config.ts.
|
|
13
|
-
*
|
|
14
|
-
* Removes matching import line and the entry from the plugins array.
|
|
15
|
-
*/
|
|
16
|
-
function removePluginFromConfig(configPath, pluginName) {
|
|
17
|
-
let content = fs.readFileSync(configPath, 'utf-8');
|
|
18
|
-
// Remove the import line that references this plugin (exact package name match)
|
|
19
|
-
const importRegex = new RegExp(`^import .+['"]${escapeRegex(pluginName)}['"]\\s*;?\\s*$\\n?`, 'gm');
|
|
20
|
-
const hadImport = importRegex.test(content);
|
|
21
|
-
// Reset regex lastIndex after test()
|
|
22
|
-
importRegex.lastIndex = 0;
|
|
23
|
-
content = content.replace(importRegex, '');
|
|
24
|
-
// Also try to remove by a derived variable name
|
|
25
|
-
const shortName = pluginName
|
|
26
|
-
.replace(/^@[^/]+\//, '')
|
|
27
|
-
.replace(/^plugin-/, '')
|
|
28
|
-
.replace(/-+/g, '-')
|
|
29
|
-
.replace(/^-|-$/g, '');
|
|
30
|
-
const varName = shortName.replace(/-([a-z])/g, (_, c) => c.toUpperCase()) + 'Plugin';
|
|
31
|
-
// Remove import by variable name if it wasn't caught above
|
|
32
|
-
if (!hadImport) {
|
|
33
|
-
const varImportRegex = new RegExp(`^import .* ${escapeRegex(varName)} .+$\\n?`, 'gm');
|
|
34
|
-
content = content.replace(varImportRegex, '');
|
|
35
|
-
}
|
|
36
|
-
// Remove the entry from the plugins array
|
|
37
|
-
// Match: varName, or 'package-name', or "package-name"
|
|
38
|
-
const entryPatterns = [
|
|
39
|
-
new RegExp(`\\s*${escapeRegex(varName)},?\\n?`, 'g'),
|
|
40
|
-
new RegExp(`\\s*['"]${escapeRegex(pluginName)}['"],?\\n?`, 'g'),
|
|
41
|
-
];
|
|
42
|
-
for (const pattern of entryPatterns) {
|
|
43
|
-
content = content.replace(pattern, '\n');
|
|
44
|
-
}
|
|
45
|
-
// Clean up empty plugins array: plugins: [\n ],
|
|
46
|
-
content = content.replace(/plugins\s*:\s*\[\s*\],?\n?/g, '');
|
|
47
|
-
fs.writeFileSync(configPath, content);
|
|
48
|
-
}
|
|
49
|
-
export { removePluginFromConfig };
|
|
50
|
-
export default class PluginRemove extends Command {
|
|
51
|
-
static description = 'Remove a plugin from objectstack.config.ts';
|
|
52
|
-
static aliases = ['plugin rm'];
|
|
53
|
-
static args = {
|
|
54
|
-
name: Args.string({ description: 'Plugin name or package name to remove', required: true }),
|
|
55
|
-
};
|
|
56
|
-
static flags = {
|
|
57
|
-
config: Flags.string({ char: 'c', description: 'Configuration file path' }),
|
|
58
|
-
};
|
|
59
|
-
async run() {
|
|
60
|
-
const { args, flags } = await this.parse(PluginRemove);
|
|
61
|
-
try {
|
|
62
|
-
const configPath = resolveConfigPath(flags.config);
|
|
63
|
-
printHeader('Remove Plugin');
|
|
64
|
-
console.log(` ${chalk.dim('Plugin:')} ${chalk.white(args.name)}`);
|
|
65
|
-
console.log(` ${chalk.dim('Config:')} ${chalk.white(path.relative(process.cwd(), configPath))}`);
|
|
66
|
-
console.log('');
|
|
67
|
-
removePluginFromConfig(configPath, args.name);
|
|
68
|
-
printSuccess(`Removed ${chalk.cyan(args.name)} from config`);
|
|
69
|
-
console.log('');
|
|
70
|
-
console.log(chalk.dim(' Tip: Run `pnpm remove ' + args.name + '` to uninstall the package'));
|
|
71
|
-
console.log('');
|
|
72
|
-
}
|
|
73
|
-
catch (error) {
|
|
74
|
-
printError(error.message || String(error));
|
|
75
|
-
this.exit(1);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
//# sourceMappingURL=remove.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remove.js","sourceRoot":"","sources":["../../../src/commands/plugin/remove.ts"],"names":[],"mappings":"AAAA,yEAAyE;AAEzE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE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AK,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACnE,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC;YAClG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAEhB,sBAAsB,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YAC9C,YAAY,CAAC,WAAW,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YAE7D,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAChB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,0BAA0B,GAAG,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC,CAAC,CAAC;YAC9F,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAClB,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,UAAU,CAAC,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAC3C,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACf,CAAC;IACH,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Command } from '@oclif/core';
|
|
2
|
-
/**
|
|
3
|
-
* Validate a plugin artifact (.tgz) for structural integrity, checksum
|
|
4
|
-
* correctness, digital signature, and platform compatibility.
|
|
5
|
-
*
|
|
6
|
-
* Architecture alignment: `npm pack --dry-run`, `helm lint`, `vsce ls`.
|
|
7
|
-
*/
|
|
8
|
-
export default class PluginValidate extends Command {
|
|
9
|
-
static description: string;
|
|
10
|
-
static args: {
|
|
11
|
-
artifact: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
12
|
-
};
|
|
13
|
-
static flags: {
|
|
14
|
-
verifySignature: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
|
-
publicKeyPath: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
-
verifyChecksums: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
|
-
validateMetadata: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
|
-
platformVersion: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
-
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
20
|
-
};
|
|
21
|
-
run(): Promise<void>;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/commands/plugin/validate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAQ,OAAO,EAAS,MAAM,aAAa,CAAC;AAOnD;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,OAAO;IACjD,OAAgB,WAAW,SAA6D;IAExF,OAAgB,IAAI;;MAElB;IAEF,OAAgB,KAAK;;;;;;;MAOnB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA4O3B"}
|