@microtronics/studio-cli 0.10.0 → 0.12.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/CHANGELOG.md +26 -0
- package/dist/studio-cli.d.ts +67 -2
- package/out/api.d.ts.map +1 -1
- package/out/api.js +3 -1
- package/out/main.js +11 -3
- package/out/manifest.d.ts.map +1 -1
- package/out/manifest.js +76 -8
- package/out/package/apm.js +1 -25
- package/out/package/library.d.ts.map +1 -0
- package/out/package/library.js +162 -0
- package/out/package/package.d.ts.map +1 -1
- package/out/package/package.js +67 -3
- package/out/registryAPI.d.ts.map +1 -1
- package/out/registryAPI.js +48 -0
- package/package.json +76 -75
- package/studio-cli-app +4 -0
- package/studio-cli-lib +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## 0.12.0 (2025-01-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **studio-cli:** cache manifest file until it's content hast changed ([f5b7128](https://bitbucket.org/microtronics-core/vscode-studio/commits/f5b7128d4938dba63a02b7d406c04e55a9747695))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **studio-cli:** wrong file path was validated during `.studioignore` validation ([2b9cc76](https://bitbucket.org/microtronics-core/vscode-studio/commits/2b9cc7672a6d339f7598863e2bf560117aaae6c8))
|
|
14
|
+
|
|
15
|
+
## 0.11.0 (2025-01-20)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **studio-cli:** allow publishing a library project to the registry ([0eabc7d](https://bitbucket.org/microtronics-core/vscode-studio/commits/0eabc7dbf335dcd61a907eab3b56c2b4ba30f57b))
|
|
21
|
+
* **studio-cli:** validate the given version string within the studio.json ([4cb429c](https://bitbucket.org/microtronics-core/vscode-studio/commits/4cb429c37cda38cd3888b868f95efe223c11aa61))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* **studio-cli:** consider during manifest validation if it is a library project ([b879aae](https://bitbucket.org/microtronics-core/vscode-studio/commits/b879aae85bced2b3bc874879ba8fa92a9928d0ae))
|
|
27
|
+
* **studio-cli:** forward studio environment to library publish function ([ba8f79f](https://bitbucket.org/microtronics-core/vscode-studio/commits/ba8f79f0fc9d05c92759a6d1ef4a11f690faba38))
|
|
28
|
+
|
|
3
29
|
## 0.10.0 (2025-01-14)
|
|
4
30
|
|
|
5
31
|
|
package/dist/studio-cli.d.ts
CHANGED
|
@@ -1901,6 +1901,34 @@ export declare namespace Helper {
|
|
|
1901
1901
|
export function patchValueWithArrayInfo(valueToPatch: any, arrayIndex: number): any;
|
|
1902
1902
|
}
|
|
1903
1903
|
|
|
1904
|
+
export declare namespace Library {
|
|
1905
|
+
/**
|
|
1906
|
+
* Creates the library.tar.gz archive content
|
|
1907
|
+
* @param cwd
|
|
1908
|
+
* @param fs
|
|
1909
|
+
*/
|
|
1910
|
+
export function createArchive(cwd: URI, fs: LocalFS): Promise<Uint8Array>;
|
|
1911
|
+
/**
|
|
1912
|
+
* Reads the project directory and returns all files that will be packed within the library.tar.gz
|
|
1913
|
+
* @param cwd
|
|
1914
|
+
* @param fs
|
|
1915
|
+
*/
|
|
1916
|
+
export function getFilesForArchive(cwd: URI, fs: LocalFS): Promise<{
|
|
1917
|
+
name: string;
|
|
1918
|
+
data: Uint8Array;
|
|
1919
|
+
modifyTime: Date;
|
|
1920
|
+
}[]>;
|
|
1921
|
+
/**
|
|
1922
|
+
* Publish new library package to the registry
|
|
1923
|
+
* @param cwd
|
|
1924
|
+
* @param fs
|
|
1925
|
+
* @param token
|
|
1926
|
+
* @param archive
|
|
1927
|
+
* @param env
|
|
1928
|
+
*/
|
|
1929
|
+
export function publishPackage(cwd: URI, fs: LocalFS, token: Registry.AuthToken, archive: Uint8Array, env?: Globals.ENV): Promise<void>;
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1904
1932
|
declare interface LocalFS {
|
|
1905
1933
|
/**
|
|
1906
1934
|
* Filesystem rm function. It has to remove files or paths recursive
|
|
@@ -2001,6 +2029,12 @@ export declare namespace Manifest {
|
|
|
2001
2029
|
* @param fs
|
|
2002
2030
|
*/
|
|
2003
2031
|
export function read(cwd: URI, fs: LocalFS): Promise<Manifest>;
|
|
2032
|
+
/**
|
|
2033
|
+
* Reads the studio.json as an uint8array
|
|
2034
|
+
* @param cwd
|
|
2035
|
+
* @param fs
|
|
2036
|
+
*/
|
|
2037
|
+
export function readAsBlob(cwd: URI, fs: LocalFS): Promise<Uint8Array>;
|
|
2004
2038
|
/**
|
|
2005
2039
|
* Write the manifest to the workspace
|
|
2006
2040
|
* @param cwd
|
|
@@ -2017,8 +2051,9 @@ export declare namespace Manifest {
|
|
|
2017
2051
|
* @param cwd
|
|
2018
2052
|
* @param fs
|
|
2019
2053
|
* @param manifest
|
|
2054
|
+
* @param env
|
|
2020
2055
|
*/
|
|
2021
|
-
export function validateManifest(cwd: URI, fs: LocalFS, manifest
|
|
2056
|
+
export function validateManifest(cwd: URI, fs: LocalFS, manifest: Manifest.Manifest | null, env?: Globals.ENV): Promise<void>;
|
|
2022
2057
|
export function validateLibraryName(libraryName: string): false | "Library name can only contain 'a' through 'z', '0' through '9', '_' and '-'. The Library name must start with an alphabetic or numeric character." | "The library name is beyond permissible length of 20 characters.";
|
|
2023
2058
|
export function validateProjectName(name: string, isLibrary?: boolean): Promise<false | "Library name can only contain 'a' through 'z', '0' through '9', '_' and '-'. The Library name must start with an alphabetic or numeric character." | "The library name is beyond permissible length of 20 characters." | "Project name can only contain 'A' through 'Z', 'a' through 'z', '0' through '9', ' ', '_' and '-'. The Project name must start with an alphabetic or numeric character." | "The project name is beyond permissible length of 40 characters.">;
|
|
2024
2059
|
export function validateDescription(description: string): Promise<false | "The description must have at least 5 characters.">;
|
|
@@ -2036,7 +2071,16 @@ export declare namespace Package {
|
|
|
2036
2071
|
*/
|
|
2037
2072
|
export function buildAll(cwd: URI, fs: LocalFS, apmPart?: APM.Part): Promise<void>;
|
|
2038
2073
|
/**
|
|
2039
|
-
*
|
|
2074
|
+
* Trigger the release based on the manifest settings
|
|
2075
|
+
* @param cwd
|
|
2076
|
+
* @param fs
|
|
2077
|
+
* @param token
|
|
2078
|
+
* @param releasePhase
|
|
2079
|
+
* @param env
|
|
2080
|
+
*/
|
|
2081
|
+
export function release(cwd: URI, fs: LocalFS, token: Registry.AuthToken, releasePhase: APM.TagPhase, env?: Globals.ENV): Promise<void>;
|
|
2082
|
+
/**
|
|
2083
|
+
* Publish an application model tag
|
|
2040
2084
|
* @param cwd
|
|
2041
2085
|
* @param fs
|
|
2042
2086
|
* @param token
|
|
@@ -2044,6 +2088,14 @@ export declare namespace Package {
|
|
|
2044
2088
|
* @param env
|
|
2045
2089
|
*/
|
|
2046
2090
|
export function releaseAPM(cwd: URI, fs: LocalFS, token: Registry.AuthToken, releasePhase: APM.TagPhase, env?: Globals.ENV): Promise<void>;
|
|
2091
|
+
/**
|
|
2092
|
+
* Publish a library project
|
|
2093
|
+
* @param cwd
|
|
2094
|
+
* @param fs
|
|
2095
|
+
* @param token
|
|
2096
|
+
* @param env
|
|
2097
|
+
*/
|
|
2098
|
+
export function releaseLibrary(cwd: URI, fs: LocalFS, token: Registry.AuthToken, env?: Globals.ENV): Promise<void>;
|
|
2047
2099
|
/**
|
|
2048
2100
|
* Read the projects README.md file
|
|
2049
2101
|
* validates if the file content is the initial content
|
|
@@ -2059,6 +2111,12 @@ export declare namespace Package {
|
|
|
2059
2111
|
* @param fs
|
|
2060
2112
|
*/
|
|
2061
2113
|
export function getChangelogFile(cwd: URI, fs: LocalFS): Promise<Uint8Array>;
|
|
2114
|
+
/**
|
|
2115
|
+
* Validate manifest settings that are required for the APM
|
|
2116
|
+
* @param token
|
|
2117
|
+
* @param manifest
|
|
2118
|
+
*/
|
|
2119
|
+
export function validateSpecificSettings(token: Registry.AuthToken, manifest: Manifest.Manifest): Promise<void>;
|
|
2062
2120
|
}
|
|
2063
2121
|
|
|
2064
2122
|
/**
|
|
@@ -4139,6 +4197,13 @@ export declare namespace Registry {
|
|
|
4139
4197
|
export function updateExistingApplication(token: AuthToken, publisherId: string, applicationId: string, updatedApplication: ApiNewApplication, env?: Globals.ENV): Promise<null | undefined>;
|
|
4140
4198
|
export type CreatedTagInfo = paths['/packages/{publisherId}/applications/{applicationId}/versions/{applicationVersion}']['post']['responses']['201']['content']['application/json'];
|
|
4141
4199
|
export function publishApplicationVersion(token: AuthToken, publisherId: string, applicationId: string, version: string, apmTagBuffer: FormData, env?: Globals.ENV): Promise<CreatedTagInfo>;
|
|
4200
|
+
export type LibraryFiles = {
|
|
4201
|
+
'studio.json': Uint8Array;
|
|
4202
|
+
'library.tar.gz': Uint8Array;
|
|
4203
|
+
'README.md': Uint8Array;
|
|
4204
|
+
'CHANGELOG.md': Uint8Array;
|
|
4205
|
+
};
|
|
4206
|
+
export function publishLibraryVersion(token: AuthToken, publisherId: string, libraryId: string, libraryVersion: string, files: LibraryFiles, env?: Globals.ENV): Promise<void>;
|
|
4142
4207
|
}
|
|
4143
4208
|
|
|
4144
4209
|
declare function uriToMemFsPath(path: URI): string;
|
package/out/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,WAAW,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EACH,OAAO,EACP,GAAG,EACH,OAAO,EACP,CAAC"}
|
package/out/api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.APM = exports.Package = exports.DLO = exports.Globals = exports.DeviceProfiles = exports.DefaultFiles = exports.Diagnostics = exports.Helper = exports.DDE = exports.DDE_Core = exports.Registry = exports.Manifest = exports.Dependencies = void 0;
|
|
3
|
+
exports.Library = exports.APM = exports.Package = exports.DLO = exports.Globals = exports.DeviceProfiles = exports.DefaultFiles = exports.Diagnostics = exports.Helper = exports.DDE = exports.DDE_Core = exports.Registry = exports.Manifest = exports.Dependencies = void 0;
|
|
4
4
|
const dependencies_1 = require("./dependencies");
|
|
5
5
|
Object.defineProperty(exports, "Dependencies", { enumerable: true, get: function () { return dependencies_1.Dependencies; } });
|
|
6
6
|
const manifest_1 = require("./manifest");
|
|
@@ -27,4 +27,6 @@ const package_1 = require("./package/package");
|
|
|
27
27
|
Object.defineProperty(exports, "Package", { enumerable: true, get: function () { return package_1.Package; } });
|
|
28
28
|
const apm_1 = require("./package/apm");
|
|
29
29
|
Object.defineProperty(exports, "APM", { enumerable: true, get: function () { return apm_1.APM; } });
|
|
30
|
+
const library_1 = require("./package/library");
|
|
31
|
+
Object.defineProperty(exports, "Library", { enumerable: true, get: function () { return library_1.Library; } });
|
|
30
32
|
//# sourceMappingURL=api.js.map
|
package/out/main.js
CHANGED
|
@@ -15,8 +15,16 @@ const apm_1 = require("./package/apm");
|
|
|
15
15
|
const globals_1 = require("./globals");
|
|
16
16
|
const program = new commander_1.Command();
|
|
17
17
|
// dummy cwd
|
|
18
|
-
const devPath =
|
|
19
|
-
|
|
18
|
+
const devPath = () => {
|
|
19
|
+
if (process.env.NODE_ENV === 'local-dev-app') {
|
|
20
|
+
return './dev/app';
|
|
21
|
+
}
|
|
22
|
+
else if (process.env.NODE_ENV === 'local-dev-lib') {
|
|
23
|
+
return './dev/lib';
|
|
24
|
+
}
|
|
25
|
+
return '';
|
|
26
|
+
};
|
|
27
|
+
const cwd = vscode_uri_1.Utils.joinPath(vscode_uri_1.URI.file(process.cwd()), devPath());
|
|
20
28
|
program.version(package_json_1.default.version).usage('<command>');
|
|
21
29
|
function handleStudioEnv(env) {
|
|
22
30
|
process.env.STUDIO_ENV = env || globals_1.Globals.ENV.production;
|
|
@@ -80,7 +88,7 @@ program
|
|
|
80
88
|
.action(async (opts) => {
|
|
81
89
|
handleStudioEnv(opts.env);
|
|
82
90
|
const token = getStudioApiToken(opts);
|
|
83
|
-
await package_1.Package.
|
|
91
|
+
await package_1.Package.release(cwd, cliFS_1.cliFS, token, opts.phase, opts.env);
|
|
84
92
|
});
|
|
85
93
|
module.exports = function (argv) {
|
|
86
94
|
program.parse(argv);
|
package/out/manifest.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAS,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAS,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,OAAO,EAAY,MAAM,MAAM,CAAC;AAIzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6BpC,yBAAiB,QAAQ,CAAC;IAEzB,KAAY,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC;IAE9F,UAAiB,QAAQ;QACxB,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAA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AAC,GAAG,QAUnF"}
|
package/out/manifest.js
CHANGED
|
@@ -1,11 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.Manifest = void 0;
|
|
7
|
+
exports.validateProjectVersion = validateProjectVersion;
|
|
4
8
|
const vscode_uri_1 = require("vscode-uri");
|
|
5
9
|
const helper_1 = require("./helper");
|
|
6
10
|
const image_dimensions_1 = require("image-dimensions");
|
|
7
11
|
const file_type_checker_1 = require("file-type-checker");
|
|
8
12
|
const registryAPI_1 = require("./registryAPI");
|
|
13
|
+
const globals_1 = require("./globals");
|
|
14
|
+
const preload_1 = __importDefault(require("semver/preload"));
|
|
15
|
+
var isNumeric = helper_1.Helper.isNumeric;
|
|
16
|
+
const STUDIO_JSON_NAME = 'studio.json';
|
|
17
|
+
// Cache to reduce the disk read requests
|
|
18
|
+
const manifestCache = {
|
|
19
|
+
_manifest: null,
|
|
20
|
+
_stat: null,
|
|
21
|
+
get manifest() {
|
|
22
|
+
// clone the cached object to prevent any reference changes
|
|
23
|
+
return structuredClone(this._manifest);
|
|
24
|
+
},
|
|
25
|
+
set manifest(manifest) {
|
|
26
|
+
this._manifest = manifest;
|
|
27
|
+
},
|
|
28
|
+
get stat() {
|
|
29
|
+
return this._stat;
|
|
30
|
+
},
|
|
31
|
+
set stat(stat) {
|
|
32
|
+
this._stat = stat;
|
|
33
|
+
},
|
|
34
|
+
clear() {
|
|
35
|
+
this._stat = null;
|
|
36
|
+
this._manifest = null;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
9
39
|
var Manifest;
|
|
10
40
|
(function (Manifest) {
|
|
11
41
|
var convertBlobToString = helper_1.Helper.convertBlobToString;
|
|
@@ -25,11 +55,27 @@ var Manifest;
|
|
|
25
55
|
* @param fs
|
|
26
56
|
*/
|
|
27
57
|
async function read(cwd, fs) {
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
|
|
58
|
+
const manifestUri = vscode_uri_1.Utils.joinPath(cwd, STUDIO_JSON_NAME);
|
|
59
|
+
const manifestStat = await fs.stat(manifestUri);
|
|
60
|
+
// if the manifest was modified, reload the cache
|
|
61
|
+
if (manifestCache.manifest === null || manifestStat?.mtime !== manifestCache.stat?.mtime) {
|
|
62
|
+
const localManifest = await fs.readFile(manifestUri);
|
|
63
|
+
const manifestString = convertBlobToString(localManifest);
|
|
64
|
+
manifestCache.manifest = JSON.parse(manifestString);
|
|
65
|
+
manifestCache.stat = manifestStat;
|
|
66
|
+
}
|
|
67
|
+
return manifestCache.manifest;
|
|
31
68
|
}
|
|
32
69
|
Manifest.read = read;
|
|
70
|
+
/**
|
|
71
|
+
* Reads the studio.json as an uint8array
|
|
72
|
+
* @param cwd
|
|
73
|
+
* @param fs
|
|
74
|
+
*/
|
|
75
|
+
async function readAsBlob(cwd, fs) {
|
|
76
|
+
return await fs.readFile(vscode_uri_1.Utils.joinPath(cwd, STUDIO_JSON_NAME));
|
|
77
|
+
}
|
|
78
|
+
Manifest.readAsBlob = readAsBlob;
|
|
33
79
|
/**
|
|
34
80
|
* Write the manifest to the workspace
|
|
35
81
|
* @param cwd
|
|
@@ -37,7 +83,8 @@ var Manifest;
|
|
|
37
83
|
* @param manifest
|
|
38
84
|
*/
|
|
39
85
|
async function write(cwd, fs, manifest) {
|
|
40
|
-
|
|
86
|
+
manifestCache.clear();
|
|
87
|
+
return fs.writeFile(vscode_uri_1.Utils.joinPath(cwd, STUDIO_JSON_NAME), JSON.stringify(manifest, null, '\t'));
|
|
41
88
|
}
|
|
42
89
|
Manifest.write = write;
|
|
43
90
|
/**
|
|
@@ -52,15 +99,19 @@ var Manifest;
|
|
|
52
99
|
* @param cwd
|
|
53
100
|
* @param fs
|
|
54
101
|
* @param manifest
|
|
102
|
+
* @param env
|
|
55
103
|
*/
|
|
56
|
-
async function validateManifest(cwd, fs, manifest) {
|
|
104
|
+
async function validateManifest(cwd, fs, manifest, env = globals_1.Globals.ENV.production) {
|
|
57
105
|
if (!manifest) {
|
|
58
106
|
manifest = await read(cwd, fs);
|
|
59
107
|
}
|
|
108
|
+
validateProjectVersion(manifest, env);
|
|
60
109
|
validatePOVSettings(manifest);
|
|
61
110
|
validateBLOSettings(manifest);
|
|
62
|
-
|
|
63
|
-
|
|
111
|
+
if (!manifest.library) {
|
|
112
|
+
validateEngineSettings(manifest);
|
|
113
|
+
await validateApplicationIcon(cwd, fs, manifest);
|
|
114
|
+
}
|
|
64
115
|
}
|
|
65
116
|
Manifest.validateManifest = validateManifest;
|
|
66
117
|
function validateLibraryName(libraryName) {
|
|
@@ -208,7 +259,7 @@ function validateHwFwOrProductId(manifest) {
|
|
|
208
259
|
async function validateApplicationIcon(cwd, fs, manifest) {
|
|
209
260
|
const iconPath = manifest.icon;
|
|
210
261
|
if (!iconPath) {
|
|
211
|
-
|
|
262
|
+
throw new Error('App icon is required for publishing an application!');
|
|
212
263
|
}
|
|
213
264
|
const iconUri = vscode_uri_1.Utils.joinPath(cwd, iconPath);
|
|
214
265
|
const iconExist = await fs.stat(iconUri);
|
|
@@ -230,4 +281,21 @@ async function validateApplicationIcon(cwd, fs, manifest) {
|
|
|
230
281
|
throw new Error(`App icon has to be of type PNG!`);
|
|
231
282
|
}
|
|
232
283
|
}
|
|
284
|
+
/**
|
|
285
|
+
* Check based on the current env if the given version string is correct
|
|
286
|
+
* @param manifest
|
|
287
|
+
* @param env
|
|
288
|
+
*/
|
|
289
|
+
function validateProjectVersion(manifest, env) {
|
|
290
|
+
if (env === globals_1.Globals.ENV.lucky || Manifest.isLibraryProject(manifest)) {
|
|
291
|
+
if (!preload_1.default.valid(manifest.version)) {
|
|
292
|
+
throw new Error('"version" has to be a semantic version string!"');
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
else {
|
|
296
|
+
if (!isNumeric(manifest.version)) {
|
|
297
|
+
throw new Error('"version" has to be a number!');
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
233
301
|
//# sourceMappingURL=manifest.js.map
|
package/out/package/apm.js
CHANGED
|
@@ -141,7 +141,7 @@ var APM;
|
|
|
141
141
|
const manifest = await manifest_1.Manifest.read(cwd, fs);
|
|
142
142
|
if (!preventCreation) {
|
|
143
143
|
// throws if the specific setting is invalid
|
|
144
|
-
await validateSpecificSettings(token, manifest);
|
|
144
|
+
await package_1.Package.validateSpecificSettings(token, manifest);
|
|
145
145
|
}
|
|
146
146
|
const { registry } = manifest;
|
|
147
147
|
let applicationId = registry?.id;
|
|
@@ -261,28 +261,4 @@ async function addAdditionalFiles(cwd, fs, apmBuffer) {
|
|
|
261
261
|
apmBuffer.append(`bin/pov/mdn_report_template.json`, reportTemplateBlob);
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
|
-
/**
|
|
265
|
-
* Validate manifest settings that are required for the APM
|
|
266
|
-
* @param token
|
|
267
|
-
* @param manifest
|
|
268
|
-
*/
|
|
269
|
-
async function validateSpecificSettings(token, manifest) {
|
|
270
|
-
const { name, publisher, description, registry } = manifest;
|
|
271
|
-
const invalidName = await manifest_1.Manifest.validateProjectName(name);
|
|
272
|
-
if (invalidName) {
|
|
273
|
-
throw new Error(`name: ${invalidName}`);
|
|
274
|
-
}
|
|
275
|
-
const invalidDescription = await manifest_1.Manifest.validateDescription(description);
|
|
276
|
-
if (invalidDescription) {
|
|
277
|
-
throw new Error(`description: ${invalidDescription}`);
|
|
278
|
-
}
|
|
279
|
-
const invalidPublisher = (await manifest_1.Manifest.validatePublisherId(publisher)) || (await manifest_1.Manifest.validatePublisherOnline(token, publisher));
|
|
280
|
-
if (invalidPublisher) {
|
|
281
|
-
throw new Error(`publisher: ${invalidPublisher}`);
|
|
282
|
-
}
|
|
283
|
-
const invalidBackends = await manifest_1.Manifest.validateRegistryAllowedBackends(registry?.allowedBackends);
|
|
284
|
-
if (invalidBackends) {
|
|
285
|
-
throw new Error(`registry: ${invalidBackends}`);
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
264
|
//# sourceMappingURL=apm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../src/package/library.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAS,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAIhC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AA4CrC,yBAAiB,OAAO,CAAC;IACxB;;;;OAIG;IACH,SAAsB,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAQ9E;IAED;;;;OAIG;IACH,SAAsB,kBAAkB,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO;;;;SA2B7D;IAED;;;;;;;OAOG;IACH,SAAsB,cAAc,CACnC,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,OAAO,EACX,KAAK,EAAE,QAAQ,CAAC,SAAS,EACzB,OAAO,EAAE,UAAU,EACnB,GAAG,GAAE,OAAO,CAAC,GAA4B,iBAUzC;CACD"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Library = void 0;
|
|
4
|
+
const vscode_uri_1 = require("vscode-uri");
|
|
5
|
+
const helper_1 = require("../helper");
|
|
6
|
+
var convertBlobToString = helper_1.Helper.convertBlobToString;
|
|
7
|
+
const minimatch_1 = require("minimatch");
|
|
8
|
+
const registryAPI_1 = require("../registryAPI");
|
|
9
|
+
const manifest_1 = require("../manifest");
|
|
10
|
+
const package_1 = require("./package");
|
|
11
|
+
const globals_1 = require("../globals");
|
|
12
|
+
const pako = require('pako');
|
|
13
|
+
const tarball = require('tarballjs');
|
|
14
|
+
const STUDIO_IGNORE_FILE = '.studioignore';
|
|
15
|
+
//see original list: https://github.com/microsoft/vscode-vsce/blob/main/src/package.ts#L1603
|
|
16
|
+
const defaultIgnore = [
|
|
17
|
+
'.vscodeignore',
|
|
18
|
+
'package-lock.json',
|
|
19
|
+
'npm-debug.log',
|
|
20
|
+
'yarn.lock',
|
|
21
|
+
'yarn-error.log',
|
|
22
|
+
'npm-shrinkwrap.json',
|
|
23
|
+
'.editorconfig',
|
|
24
|
+
'.npmrc',
|
|
25
|
+
'.yarnrc',
|
|
26
|
+
'.gitattributes',
|
|
27
|
+
'*.todo',
|
|
28
|
+
'tslint.yaml',
|
|
29
|
+
'.eslintrc*',
|
|
30
|
+
'.babelrc*',
|
|
31
|
+
'.prettierrc*',
|
|
32
|
+
'.cz-config.js',
|
|
33
|
+
'.commitlintrc*',
|
|
34
|
+
'webpack.config.js',
|
|
35
|
+
'ISSUE_TEMPLATE.md',
|
|
36
|
+
'CONTRIBUTING.md',
|
|
37
|
+
'PULL_REQUEST_TEMPLATE.md',
|
|
38
|
+
'CODE_OF_CONDUCT.md',
|
|
39
|
+
'.github',
|
|
40
|
+
'.travis.yml',
|
|
41
|
+
'appveyor.yml',
|
|
42
|
+
'**/.git',
|
|
43
|
+
'**/.git/**',
|
|
44
|
+
'**/*.vsix',
|
|
45
|
+
'**/.DS_Store',
|
|
46
|
+
'**/*.vsixmanifest',
|
|
47
|
+
'**/.vscode-test/**',
|
|
48
|
+
'**/.vscode-test-web/**'
|
|
49
|
+
];
|
|
50
|
+
defaultIgnore.push(...['**/.studio/**', '**/node_modules/**', STUDIO_IGNORE_FILE]);
|
|
51
|
+
const MINIMATCH_OPTIONS = { dot: true };
|
|
52
|
+
var Library;
|
|
53
|
+
(function (Library) {
|
|
54
|
+
/**
|
|
55
|
+
* Creates the library.tar.gz archive content
|
|
56
|
+
* @param cwd
|
|
57
|
+
* @param fs
|
|
58
|
+
*/
|
|
59
|
+
async function createArchive(cwd, fs) {
|
|
60
|
+
const tar = new tarball.TarWriter();
|
|
61
|
+
const filesToPack = await getFilesForArchive(cwd, fs);
|
|
62
|
+
filesToPack.forEach(file => {
|
|
63
|
+
tar.addFileArrayBuffer(file.name, file.data);
|
|
64
|
+
});
|
|
65
|
+
const tarBuffer = await tar.write();
|
|
66
|
+
return pako.gzip(tarBuffer);
|
|
67
|
+
}
|
|
68
|
+
Library.createArchive = createArchive;
|
|
69
|
+
/**
|
|
70
|
+
* Reads the project directory and returns all files that will be packed within the library.tar.gz
|
|
71
|
+
* @param cwd
|
|
72
|
+
* @param fs
|
|
73
|
+
*/
|
|
74
|
+
async function getFilesForArchive(cwd, fs) {
|
|
75
|
+
const files = [];
|
|
76
|
+
const { ignore, negate } = await getIgnoreNegateList(cwd, fs);
|
|
77
|
+
const allFiles = await fs.findFiles(cwd, '**/*');
|
|
78
|
+
const filteredFiles = allFiles.filter(({ path }) => {
|
|
79
|
+
const relativePath = path.slice(cwd.path.length + 1);
|
|
80
|
+
return (!ignore.some(i => (0, minimatch_1.minimatch)(relativePath, i, MINIMATCH_OPTIONS)) ||
|
|
81
|
+
negate.some(i => (0, minimatch_1.minimatch)(relativePath, i.slice(1), MINIMATCH_OPTIONS)));
|
|
82
|
+
});
|
|
83
|
+
for (const fileUri of filteredFiles) {
|
|
84
|
+
const relativePath = fileUri.path.slice(cwd.path.length + 1);
|
|
85
|
+
const [stat, blob] = await Promise.all([fs.stat(fileUri), fs.readFile(fileUri)]);
|
|
86
|
+
if (stat) {
|
|
87
|
+
files.push({
|
|
88
|
+
name: relativePath,
|
|
89
|
+
data: blob,
|
|
90
|
+
modifyTime: new Date(stat.mtime)
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return files;
|
|
95
|
+
}
|
|
96
|
+
Library.getFilesForArchive = getFilesForArchive;
|
|
97
|
+
/**
|
|
98
|
+
* Publish new library package to the registry
|
|
99
|
+
* @param cwd
|
|
100
|
+
* @param fs
|
|
101
|
+
* @param token
|
|
102
|
+
* @param archive
|
|
103
|
+
* @param env
|
|
104
|
+
*/
|
|
105
|
+
async function publishPackage(cwd, fs, token, archive, env = globals_1.Globals.ENV.production) {
|
|
106
|
+
const { publisher, name, version } = await manifest_1.Manifest.read(cwd, fs);
|
|
107
|
+
const files = {
|
|
108
|
+
'CHANGELOG.md': await package_1.Package.getChangelogFile(cwd, fs),
|
|
109
|
+
'README.md': await package_1.Package.getReadmeFile(cwd, fs, name),
|
|
110
|
+
'library.tar.gz': archive,
|
|
111
|
+
'studio.json': await manifest_1.Manifest.readAsBlob(cwd, fs)
|
|
112
|
+
};
|
|
113
|
+
return await registryAPI_1.Registry.publishLibraryVersion(token, publisher, name, version, files, env);
|
|
114
|
+
}
|
|
115
|
+
Library.publishPackage = publishPackage;
|
|
116
|
+
})(Library || (exports.Library = Library = {}));
|
|
117
|
+
/**
|
|
118
|
+
* Parse the studioignore file and returns a list of ignore files and negations
|
|
119
|
+
* @param cwd
|
|
120
|
+
* @param fs
|
|
121
|
+
*/
|
|
122
|
+
async function getIgnoreNegateList(cwd, fs) {
|
|
123
|
+
const notIgnored = ['!studio.json', `!README.md`];
|
|
124
|
+
// this code is mostly from https://github.com/microsoft/vscode-vsce/blob/main/src/package.ts#L1681
|
|
125
|
+
const ignoreFile = await getIgnoreFile(cwd, fs);
|
|
126
|
+
// Parse raw ignore by splitting output into lines and filtering out empty lines and comments
|
|
127
|
+
const filteredIgnore = ignoreFile
|
|
128
|
+
.split(/[\n\r]/)
|
|
129
|
+
.map(s => s.trim())
|
|
130
|
+
.filter(s => !!s)
|
|
131
|
+
.filter(i => !/^\s*#/.test(i));
|
|
132
|
+
// Add '/**' to possible folders
|
|
133
|
+
const folderAgnosticIgnore = [
|
|
134
|
+
...filteredIgnore,
|
|
135
|
+
...filteredIgnore.filter(i => !/(^|\/)[^/]*\*[^/]*$/.test(i)).map(i => (/\/$/.test(i) ? `${i}**` : `${i}/**`))
|
|
136
|
+
];
|
|
137
|
+
// Combine with default ignore list
|
|
138
|
+
const combinedIgnoreList = [...defaultIgnore, ...folderAgnosticIgnore, ...notIgnored];
|
|
139
|
+
// Split into ignore and negate list
|
|
140
|
+
const [ignore, negate] = combinedIgnoreList.reduce((r, e) => (!/^\s*!/.test(e) ? [[...r[0], e], r[1]] : [r[0], [...r[1], e]]), [[], []]);
|
|
141
|
+
return {
|
|
142
|
+
ignore,
|
|
143
|
+
negate
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Reads the .studioignore file if exist
|
|
148
|
+
* @param cwd
|
|
149
|
+
* @param fs
|
|
150
|
+
*/
|
|
151
|
+
async function getIgnoreFile(cwd, fs) {
|
|
152
|
+
const ignoreFilePath = vscode_uri_1.Utils.joinPath(cwd, STUDIO_IGNORE_FILE);
|
|
153
|
+
const exists = await fs.stat(ignoreFilePath);
|
|
154
|
+
if (exists) {
|
|
155
|
+
const ignoreFile = await fs.readFile(ignoreFilePath);
|
|
156
|
+
return convertBlobToString(ignoreFile);
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
return '';
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
//# sourceMappingURL=library.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/package/package.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAS,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAIhC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAK5B,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/package/package.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAS,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO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QAAQ,EAAE,QAAQ,CAAC,QAAQ,iBAwBpG;CACD"}
|
package/out/package/package.js
CHANGED
|
@@ -12,6 +12,7 @@ const compiler_1 = require("../dlo/compiler");
|
|
|
12
12
|
const scriptRunner_1 = require("../scriptRunner");
|
|
13
13
|
const manifest_1 = require("../manifest");
|
|
14
14
|
const globals_1 = require("../globals");
|
|
15
|
+
const library_1 = require("./library");
|
|
15
16
|
var Package;
|
|
16
17
|
(function (Package) {
|
|
17
18
|
/**
|
|
@@ -37,7 +38,25 @@ var Package;
|
|
|
37
38
|
}
|
|
38
39
|
Package.buildAll = buildAll;
|
|
39
40
|
/**
|
|
40
|
-
*
|
|
41
|
+
* Trigger the release based on the manifest settings
|
|
42
|
+
* @param cwd
|
|
43
|
+
* @param fs
|
|
44
|
+
* @param token
|
|
45
|
+
* @param releasePhase
|
|
46
|
+
* @param env
|
|
47
|
+
*/
|
|
48
|
+
async function release(cwd, fs, token, releasePhase, env = globals_1.Globals.ENV.production) {
|
|
49
|
+
const manifest = await manifest_1.Manifest.read(cwd, fs);
|
|
50
|
+
if (manifest_1.Manifest.isLibraryProject(manifest)) {
|
|
51
|
+
await releaseLibrary(cwd, fs, token, env);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
await releaseAPM(cwd, fs, token, releasePhase, env);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
Package.release = release;
|
|
58
|
+
/**
|
|
59
|
+
* Publish an application model tag
|
|
41
60
|
* @param cwd
|
|
42
61
|
* @param fs
|
|
43
62
|
* @param token
|
|
@@ -48,12 +67,11 @@ var Package;
|
|
|
48
67
|
if (!Object.values(apm_1.APM.TagPhase).includes(releasePhase)) {
|
|
49
68
|
throw new Error(`ReleasePhase: ${releasePhase} is not a valid release phase`);
|
|
50
69
|
}
|
|
51
|
-
await manifest_1.Manifest.validateManifest(cwd, fs);
|
|
70
|
+
await manifest_1.Manifest.validateManifest(cwd, fs, null, env);
|
|
52
71
|
const application = await apm_1.APM.validateAccess(cwd, fs, token, false, env);
|
|
53
72
|
if (!application) {
|
|
54
73
|
return;
|
|
55
74
|
}
|
|
56
|
-
// todo validate version
|
|
57
75
|
// build the complete project
|
|
58
76
|
await buildAll(cwd, fs);
|
|
59
77
|
// update the store apm with the actual name/description/...
|
|
@@ -63,6 +81,24 @@ var Package;
|
|
|
63
81
|
console.log(`Tag "${newTag.version}" with phase "${newTag.phase}" published!`);
|
|
64
82
|
}
|
|
65
83
|
Package.releaseAPM = releaseAPM;
|
|
84
|
+
/**
|
|
85
|
+
* Publish a library project
|
|
86
|
+
* @param cwd
|
|
87
|
+
* @param fs
|
|
88
|
+
* @param token
|
|
89
|
+
* @param env
|
|
90
|
+
*/
|
|
91
|
+
async function releaseLibrary(cwd, fs, token, env = globals_1.Globals.ENV.production) {
|
|
92
|
+
const manifest = await manifest_1.Manifest.read(cwd, fs);
|
|
93
|
+
await manifest_1.Manifest.validateManifest(cwd, fs, manifest, env);
|
|
94
|
+
await validateSpecificSettings(token, manifest);
|
|
95
|
+
// build the complete project
|
|
96
|
+
await buildAll(cwd, fs);
|
|
97
|
+
const archive = await library_1.Library.createArchive(cwd, fs);
|
|
98
|
+
await library_1.Library.publishPackage(cwd, fs, token, archive, env);
|
|
99
|
+
console.log(`Library "${manifest.publisher}/${manifest.name}" with version "${manifest.version}" published!`);
|
|
100
|
+
}
|
|
101
|
+
Package.releaseLibrary = releaseLibrary;
|
|
66
102
|
/**
|
|
67
103
|
* Read the projects README.md file
|
|
68
104
|
* validates if the file content is the initial content
|
|
@@ -106,6 +142,34 @@ var Package;
|
|
|
106
142
|
return fileBlob;
|
|
107
143
|
}
|
|
108
144
|
Package.getChangelogFile = getChangelogFile;
|
|
145
|
+
/**
|
|
146
|
+
* Validate manifest settings that are required for the APM
|
|
147
|
+
* @param token
|
|
148
|
+
* @param manifest
|
|
149
|
+
*/
|
|
150
|
+
async function validateSpecificSettings(token, manifest) {
|
|
151
|
+
const { name, publisher, description, registry } = manifest;
|
|
152
|
+
const invalidName = await manifest_1.Manifest.validateProjectName(name);
|
|
153
|
+
if (invalidName) {
|
|
154
|
+
throw new Error(`name: ${invalidName}`);
|
|
155
|
+
}
|
|
156
|
+
const invalidDescription = await manifest_1.Manifest.validateDescription(description);
|
|
157
|
+
if (invalidDescription) {
|
|
158
|
+
throw new Error(`description: ${invalidDescription}`);
|
|
159
|
+
}
|
|
160
|
+
const invalidPublisher = (await manifest_1.Manifest.validatePublisherId(publisher)) || (await manifest_1.Manifest.validatePublisherOnline(token, publisher));
|
|
161
|
+
if (invalidPublisher) {
|
|
162
|
+
throw new Error(`publisher: ${invalidPublisher}`);
|
|
163
|
+
}
|
|
164
|
+
// only validate if the project is not a library project
|
|
165
|
+
if (!manifest_1.Manifest.isLibraryProject(manifest)) {
|
|
166
|
+
const invalidBackends = await manifest_1.Manifest.validateRegistryAllowedBackends(registry?.allowedBackends);
|
|
167
|
+
if (invalidBackends) {
|
|
168
|
+
throw new Error(`registry: ${invalidBackends}`);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
Package.validateSpecificSettings = validateSpecificSettings;
|
|
109
173
|
})(Package || (exports.Package = Package = {}));
|
|
110
174
|
/**
|
|
111
175
|
* Generates all needed files out of the dde declaration
|
package/out/registryAPI.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registryAPI.d.ts","sourceRoot":"","sources":["../src/registryAPI.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;;cAKnD;AAED,yBAAiB,QAAQ,CAAC;IACzB,KAAY,SAAS,GAAG,MAAM,GAAG,IAAI,CAAC;IACtC;;OAEG;IACI,MAAM,SAAS;;KAIrB,CAAC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AW,EAAE,UAAU,CAAC;QACxB,cAAc,EAAE,UAAU,CAAC;KAC3B,CAAC;IAQF,SAAsB,qBAAqB,CAC1C,KAAK,EAAE,SAAS,EAChB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,YAAY,EACnB,GAAG,GAAE,OAAO,CAAC,GAA4B,iBAwCzC;CACD"}
|
package/out/registryAPI.js
CHANGED
|
@@ -192,6 +192,54 @@ var Registry;
|
|
|
192
192
|
return data;
|
|
193
193
|
}
|
|
194
194
|
Registry.publishApplicationVersion = publishApplicationVersion;
|
|
195
|
+
const NameToMimeType = {
|
|
196
|
+
'README.md': 'text/markdown',
|
|
197
|
+
'CHANGELOG.md': 'text/markdown',
|
|
198
|
+
'library.tar.gz': 'application/gzip',
|
|
199
|
+
'studio.json': 'application/json'
|
|
200
|
+
};
|
|
201
|
+
async function publishLibraryVersion(token, publisherId, libraryId, libraryVersion, files, env = globals_1.Globals.ENV.production) {
|
|
202
|
+
try {
|
|
203
|
+
const { error } = await POST('/packages/{publisherId}/libraries/{libraryId}/versions/{libraryVersion}', {
|
|
204
|
+
...Registry.getAPIUrl(),
|
|
205
|
+
headers: {
|
|
206
|
+
...buildAuthHeader(token),
|
|
207
|
+
...headerBasedOnEnv(env)
|
|
208
|
+
},
|
|
209
|
+
params: {
|
|
210
|
+
path: {
|
|
211
|
+
publisherId,
|
|
212
|
+
libraryId,
|
|
213
|
+
libraryVersion
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
//@ts-ignore
|
|
217
|
+
body: {
|
|
218
|
+
...files
|
|
219
|
+
},
|
|
220
|
+
bodySerializer(body) {
|
|
221
|
+
const fd = new FormData();
|
|
222
|
+
//@ts-ignore
|
|
223
|
+
for (const [k, v] of Object.entries(body)) {
|
|
224
|
+
// append key as filename:
|
|
225
|
+
if (v !== undefined) {
|
|
226
|
+
//@ts-ignore
|
|
227
|
+
fd.append(k, new Blob([v], { type: NameToMimeType[k] }), k);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return fd;
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
if (error) {
|
|
234
|
+
throw new Error(error.reason);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
catch (e) {
|
|
238
|
+
console.error(e);
|
|
239
|
+
throw e;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
Registry.publishLibraryVersion = publishLibraryVersion;
|
|
195
243
|
})(Registry || (exports.Registry = Registry = {}));
|
|
196
244
|
/**
|
|
197
245
|
* inject the X-Semver header for application based requests
|
package/package.json
CHANGED
|
@@ -1,75 +1,76 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@microtronics/studio-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Microtronics Studio CLI Tool",
|
|
5
|
-
"main": "./out/api.js",
|
|
6
|
-
"typings": "./dist/studio-cli.d.ts",
|
|
7
|
-
"bin": {
|
|
8
|
-
"studio-cli": "studio-cli"
|
|
9
|
-
},
|
|
10
|
-
"publishConfig": {
|
|
11
|
-
"access": "public"
|
|
12
|
-
},
|
|
13
|
-
"scripts": {
|
|
14
|
-
"release": "release-it --ci",
|
|
15
|
-
"compile": "npm run build:registryApiTypings && tsc",
|
|
16
|
-
"api": "api-extractor run --local --verbose",
|
|
17
|
-
"build": "npm run compile && npm run api",
|
|
18
|
-
"watch:build": "npm run compile -- --watch",
|
|
19
|
-
"test": "cross-env STUDIO_ENV=lucky mocha",
|
|
20
|
-
"test-ci": "cross-env STUDIO_ENV=lucky mocha --reporter mocha-junit-reporter",
|
|
21
|
-
"watch:test": "npm run test -- --watch",
|
|
22
|
-
"prepublishOnly": "npm run build",
|
|
23
|
-
"build:registryApiTypings": "npx openapi-typescript https://api.registry.stage.microtronics.com/v1/openapi.yaml -o ./src/typings/registry.ts"
|
|
24
|
-
},
|
|
25
|
-
"author": "Microtronics",
|
|
26
|
-
"license": "ISC",
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"ajv": "^8.17.1",
|
|
29
|
-
"ajv-formats": "^3.0.1",
|
|
30
|
-
"ajv-keywords": "^5.1.0",
|
|
31
|
-
"commander": "^12.1.0",
|
|
32
|
-
"cross-fetch": "^4.0.0",
|
|
33
|
-
"glob": "^11.0.1",
|
|
34
|
-
"iconv-lite": "^0.6.3",
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"@
|
|
52
|
-
"@types/chai
|
|
53
|
-
"@types/
|
|
54
|
-
"@types/
|
|
55
|
-
"@types/
|
|
56
|
-
"@types/
|
|
57
|
-
"@types/
|
|
58
|
-
"
|
|
59
|
-
"chai
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"mocha
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@microtronics/studio-cli",
|
|
3
|
+
"version": "0.12.0",
|
|
4
|
+
"description": "Microtronics Studio CLI Tool",
|
|
5
|
+
"main": "./out/api.js",
|
|
6
|
+
"typings": "./dist/studio-cli.d.ts",
|
|
7
|
+
"bin": {
|
|
8
|
+
"studio-cli": "studio-cli"
|
|
9
|
+
},
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"release": "release-it --ci",
|
|
15
|
+
"compile": "npm run build:registryApiTypings && tsc",
|
|
16
|
+
"api": "api-extractor run --local --verbose",
|
|
17
|
+
"build": "npm run compile && npm run api",
|
|
18
|
+
"watch:build": "npm run compile -- --watch",
|
|
19
|
+
"test": "cross-env STUDIO_ENV=lucky mocha",
|
|
20
|
+
"test-ci": "cross-env STUDIO_ENV=lucky mocha --reporter mocha-junit-reporter",
|
|
21
|
+
"watch:test": "npm run test -- --watch",
|
|
22
|
+
"prepublishOnly": "npm run build",
|
|
23
|
+
"build:registryApiTypings": "npx openapi-typescript https://api.registry.stage.microtronics.com/v1/openapi.yaml -o ./src/typings/registry.ts"
|
|
24
|
+
},
|
|
25
|
+
"author": "Microtronics",
|
|
26
|
+
"license": "ISC",
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"ajv": "^8.17.1",
|
|
29
|
+
"ajv-formats": "^3.0.1",
|
|
30
|
+
"ajv-keywords": "^5.1.0",
|
|
31
|
+
"commander": "^12.1.0",
|
|
32
|
+
"cross-fetch": "^4.0.0",
|
|
33
|
+
"glob": "^11.0.1",
|
|
34
|
+
"iconv-lite": "^0.6.3",
|
|
35
|
+
"minimatch": "^10.0.1",
|
|
36
|
+
"ini": "^5.0.0",
|
|
37
|
+
"openapi-fetch": "^0.13.0",
|
|
38
|
+
"pako": "^2.1.0",
|
|
39
|
+
"semver": "^7.6.3",
|
|
40
|
+
"tarballjs": "github:ankitrohatgi/tarballjs",
|
|
41
|
+
"tinytar-fix": "^0.1.1",
|
|
42
|
+
"vscode-uri": "^3.0.8",
|
|
43
|
+
"yaml": "^2.6.1",
|
|
44
|
+
"image-dimensions": "^2.3.0",
|
|
45
|
+
"file-type-checker": "^1.1.2"
|
|
46
|
+
},
|
|
47
|
+
"engines": {
|
|
48
|
+
"node": ">= 22"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@microsoft/api-extractor": "^7.47.11",
|
|
52
|
+
"@types/chai": "^4.3.6",
|
|
53
|
+
"@types/chai-as-promised": "^7.1.5",
|
|
54
|
+
"@types/ini": "^4.1.1",
|
|
55
|
+
"@types/mocha": "^10.0.9",
|
|
56
|
+
"@types/node": "^22.9.1",
|
|
57
|
+
"@types/semver": "^7.5.6",
|
|
58
|
+
"@types/vscode": "^1.86.2",
|
|
59
|
+
"chai": "^4.3.8",
|
|
60
|
+
"chai-as-promised": "^7.1.2",
|
|
61
|
+
"cross-env": "^7.0.3",
|
|
62
|
+
"mocha": "^10.8.2",
|
|
63
|
+
"mocha-junit-reporter": "^2.2.1",
|
|
64
|
+
"openapi-typescript": "^7.4.3",
|
|
65
|
+
"ts-node": "^10.9.2",
|
|
66
|
+
"typescript": "^5.6.3"
|
|
67
|
+
},
|
|
68
|
+
"mocha": {
|
|
69
|
+
"require": [
|
|
70
|
+
"ts-node/register"
|
|
71
|
+
],
|
|
72
|
+
"watch-files": "src/**",
|
|
73
|
+
"spec": "./test/**/*.spec.ts",
|
|
74
|
+
"recursive": true
|
|
75
|
+
}
|
|
76
|
+
}
|
package/studio-cli-app
ADDED
package/studio-cli-lib
ADDED