@microtronics/studio-cli 0.3.0 → 0.3.2

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 CHANGED
@@ -1,19 +1,28 @@
1
1
 
2
2
 
3
- ## 0.3.0 (2024-11-26)
4
-
5
-
6
- ### Features
7
-
8
- * **studio-cli:** added command to retrive version ([c96f267](https://bitbucket.org/microtronics-core/vscode-studio/commits/c96f267d6f856487c53c3120f708f17b93b8e53c))
9
- * **studio-cli:** automatic version generation with release-it ([009bfb1](https://bitbucket.org/microtronics-core/vscode-studio/commits/009bfb1bb242d9d2bc0113093ff0e480e19f32fc))
10
- * **studio-cli:** first version of registry api ([283c85c](https://bitbucket.org/microtronics-core/vscode-studio/commits/283c85cf68faf480f97efc23d3ef00931761a6cf))
11
- * **studio-cli:** first working version to install dependencies ([d5f89bc](https://bitbucket.org/microtronics-core/vscode-studio/commits/d5f89bc263bf7f5d17f5515de557a8db1ecfb279))
12
- * **studio-cli:** fs interfaces to allwo requesting with vscode fs and node fs ([b39bd6f](https://bitbucket.org/microtronics-core/vscode-studio/commits/b39bd6f4ca61816607fdc8b381d5b263e056e3f1))
13
- * **studio-cli:** migrated `buildDependencyTree` function with tests ([392a43e](https://bitbucket.org/microtronics-core/vscode-studio/commits/392a43e7859c8b1cb665c043ae52c8f09ab188a0))
14
- * **studio-cli:** migrated `isDependencyInstalled` function ([ae9c5c2](https://bitbucket.org/microtronics-core/vscode-studio/commits/ae9c5c24919f1e1ff9fa1b2778677f9af1fdc0e3))
15
- * **studio-cli:** new function to remove an existing library ([50f18f6](https://bitbucket.org/microtronics-core/vscode-studio/commits/50f18f6039dd21cf62c6dc8d16b14bad2268c8f3))
16
- * **studio-cli:** released version v0.2.0 ([82ed857](https://bitbucket.org/microtronics-core/vscode-studio/commits/82ed85723579ec886994dde5b93dc2f813127a24))
3
+ ## 0.3.2 (2024-11-26)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **studio-cli:** run npm build during prepublish ([d8640f1](https://bitbucket.org/microtronics-core/vscode-studio/commits/d8640f163537d2acc988abc92b39bcd14a6b2323))
9
+
10
+ ## 0.3.1 (2024-11-26)
11
+
12
+ ## 0.3.0 (2024-11-26)
13
+
14
+
15
+ ### Features
16
+
17
+ * **studio-cli:** added command to retrive version ([c96f267](https://bitbucket.org/microtronics-core/vscode-studio/commits/c96f267d6f856487c53c3120f708f17b93b8e53c))
18
+ * **studio-cli:** automatic version generation with release-it ([009bfb1](https://bitbucket.org/microtronics-core/vscode-studio/commits/009bfb1bb242d9d2bc0113093ff0e480e19f32fc))
19
+ * **studio-cli:** first version of registry api ([283c85c](https://bitbucket.org/microtronics-core/vscode-studio/commits/283c85cf68faf480f97efc23d3ef00931761a6cf))
20
+ * **studio-cli:** first working version to install dependencies ([d5f89bc](https://bitbucket.org/microtronics-core/vscode-studio/commits/d5f89bc263bf7f5d17f5515de557a8db1ecfb279))
21
+ * **studio-cli:** fs interfaces to allwo requesting with vscode fs and node fs ([b39bd6f](https://bitbucket.org/microtronics-core/vscode-studio/commits/b39bd6f4ca61816607fdc8b381d5b263e056e3f1))
22
+ * **studio-cli:** migrated `buildDependencyTree` function with tests ([392a43e](https://bitbucket.org/microtronics-core/vscode-studio/commits/392a43e7859c8b1cb665c043ae52c8f09ab188a0))
23
+ * **studio-cli:** migrated `isDependencyInstalled` function ([ae9c5c2](https://bitbucket.org/microtronics-core/vscode-studio/commits/ae9c5c24919f1e1ff9fa1b2778677f9af1fdc0e3))
24
+ * **studio-cli:** new function to remove an existing library ([50f18f6](https://bitbucket.org/microtronics-core/vscode-studio/commits/50f18f6039dd21cf62c6dc8d16b14bad2268c8f3))
25
+ * **studio-cli:** released version v0.2.0 ([82ed857](https://bitbucket.org/microtronics-core/vscode-studio/commits/82ed85723579ec886994dde5b93dc2f813127a24))
17
26
  * **studio-cli:** studio manifest interface to read manifest file ([403ef8e](https://bitbucket.org/microtronics-core/vscode-studio/commits/403ef8e68ded21ffa1d47bf55a7c0fdd3fe29167))
18
27
 
19
28
  ## 0.2.0 (2024-11-26)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microtronics/studio-cli",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Microtronics Studio CLI Tool",
5
5
  "main": "./out/api.js",
6
6
  "typings": "./dist/studio-cli.d.ts",
@@ -16,6 +16,7 @@
16
16
  "test": "cross-env STUDIO_ENV=lucky mocha",
17
17
  "test-ci": "cross-env STUDIO_ENV=lucky mocha --reporter mocha-junit-reporter",
18
18
  "watch:test": "npm run test -- --watch",
19
+ "prepublish": "npm run build",
19
20
  "build:registryApiTypings": "npx openapi-typescript https://api.registry.stage.microtronics.com/v1/openapi.yaml -o ./src/typings/registry.ts"
20
21
  },
21
22
  "author": "Microtronics",
package/studio-cli CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- require('./out/main')(process.argv);
2
+ require('./out/main')(process.argv);
@@ -0,0 +1,53 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <testsuites name="Mocha Tests" time="0.389" tests="14" failures="0">
3
+ <testsuite name="Root Suite" timestamp="2024-11-26T15:11:39" tests="0" time="0.000" failures="0">
4
+ </testsuite>
5
+ <testsuite name="Dependencies" timestamp="2024-11-26T15:11:39" tests="0" file="C:\Program Files (x86)\Jenkins\workspace\vscode-studio_main\cli\test\dependencies.spec.ts" time="0.000" failures="0">
6
+ </testsuite>
7
+ <testsuite name="rangeToVersion" timestamp="2024-11-26T15:11:39" tests="2" file="C:\Program Files (x86)\Jenkins\workspace\vscode-studio_main\cli\test\dependencies.spec.ts" time="0.002" failures="0">
8
+ <testcase name="Dependencies rangeToVersion should convert a semver range to a version string" time="0.001" classname="should convert a semver range to a version string">
9
+ </testcase>
10
+ <testcase name="Dependencies rangeToVersion should keep a valid version string as it is" time="0.000" classname="should keep a valid version string as it is">
11
+ </testcase>
12
+ </testsuite>
13
+ <testsuite name="validateDependencyTree" timestamp="2024-11-26T15:11:39" tests="3" file="C:\Program Files (x86)\Jenkins\workspace\vscode-studio_main\cli\test\dependencies.spec.ts" time="0.004" failures="0">
14
+ <testcase name="Dependencies validateDependencyTree should build a valid devDependency tree" time="0.003" classname="should build a valid devDependency tree">
15
+ </testcase>
16
+ <testcase name="Dependencies validateDependencyTree should build a valid production dependency tree" time="0.000" classname="should build a valid production dependency tree">
17
+ </testcase>
18
+ <testcase name="Dependencies validateDependencyTree should build a valid dependency tree with a given dependency" time="0.001" classname="should build a valid dependency tree with a given dependency">
19
+ </testcase>
20
+ </testsuite>
21
+ <testsuite name="isDependencyInstalled" timestamp="2024-11-26T15:11:39" tests="2" file="C:\Program Files (x86)\Jenkins\workspace\vscode-studio_main\cli\test\dependencies.spec.ts" time="0.002" failures="0">
22
+ <testcase name="Dependencies isDependencyInstalled should return that the dependency is installed" time="0.001" classname="should return that the dependency is installed">
23
+ </testcase>
24
+ <testcase name="Dependencies isDependencyInstalled should inform that the library is not installed" time="0.001" classname="should inform that the library is not installed">
25
+ </testcase>
26
+ </testsuite>
27
+ <testsuite name="removeExisting" timestamp="2024-11-26T15:11:39" tests="1" file="C:\Program Files (x86)\Jenkins\workspace\vscode-studio_main\cli\test\dependencies.spec.ts" time="0.007" failures="0">
28
+ <testcase name="Dependencies removeExisting should remove the existing library" time="0.003" classname="should remove the existing library">
29
+ </testcase>
30
+ </testsuite>
31
+ <testsuite name="extractLibrary" timestamp="2024-11-26T15:11:39" tests="1" file="C:\Program Files (x86)\Jenkins\workspace\vscode-studio_main\cli\test\dependencies.spec.ts" time="0.143" failures="0">
32
+ <testcase name="Dependencies extractLibrary should extract the tar.gz to the directory" time="0.129" classname="should extract the tar.gz to the directory">
33
+ </testcase>
34
+ </testsuite>
35
+ <testsuite name="singleInstall" timestamp="2024-11-26T15:11:40" tests="1" file="C:\Program Files (x86)\Jenkins\workspace\vscode-studio_main\cli\test\dependencies.spec.ts" time="0.214" failures="0">
36
+ <testcase name="Dependencies singleInstall should install the given dependency" time="0.206" classname="should install the given dependency">
37
+ </testcase>
38
+ </testsuite>
39
+ <testsuite name="remove dependency" timestamp="2024-11-26T15:11:40" tests="1" file="C:\Program Files (x86)\Jenkins\workspace\vscode-studio_main\cli\test\dependencies.spec.ts" time="0.006" failures="0">
40
+ <testcase name="Dependencies remove dependency should remove the given library" time="0.002" classname="should remove the given library">
41
+ </testcase>
42
+ </testsuite>
43
+ <testsuite name="remove with sub-dependency" timestamp="2024-11-26T15:11:40" tests="1" file="C:\Program Files (x86)\Jenkins\workspace\vscode-studio_main\cli\test\dependencies.spec.ts" time="0.007" failures="0">
44
+ <testcase name="Dependencies remove with sub-dependency should not remove the given library due to sub-dependency requirements" time="0.000" classname="should not remove the given library due to sub-dependency requirements">
45
+ </testcase>
46
+ </testsuite>
47
+ <testsuite name="StudioManifest" timestamp="2024-11-26T15:11:40" tests="2" file="C:\Program Files (x86)\Jenkins\workspace\vscode-studio_main\cli\test\manifest.spec.ts" time="0.002" failures="0">
48
+ <testcase name="StudioManifest should return the studio manifest" time="0.001" classname="should return the studio manifest">
49
+ </testcase>
50
+ <testcase name="StudioManifest should throw if the file does not exist" time="0.000" classname="should throw if the file does not exist">
51
+ </testcase>
52
+ </testsuite>
53
+ </testsuites>
@@ -1,479 +0,0 @@
1
- import { SemVer } from 'semver';
2
- import { URI } from 'vscode-uri';
3
-
4
- declare interface components {
5
- schemas: {
6
- /** @default 25 */
7
- PaginationLimit: number;
8
- ResultMeta: {
9
- /** @description Pagination information */
10
- resultSet?: {
11
- /** @description The total amount of entities in the database */
12
- total: number;
13
- /** @description The number of entities in the data array */
14
- count: number;
15
- /** @description The current offset of entities */
16
- offset: number;
17
- limit: components["schemas"]["PaginationLimit"];
18
- };
19
- };
20
- LibraryInformationBase: {
21
- name: components["parameters"]["LibraryId"];
22
- /** @description Short description what this library does */
23
- description: string;
24
- publisherId: components["parameters"]["PublisherId"];
25
- };
26
- LibraryListInformation: components["schemas"]["LibraryInformationBase"] & {
27
- version: components["schemas"]["LibraryVersion"];
28
- };
29
- LibraryDetailInformation: components["schemas"]["LibraryInformationBase"] & {
30
- versions?: components["schemas"]["LibraryVersion"][];
31
- };
32
- LibraryVersion: {
33
- /**
34
- * @description Version name
35
- * @example 0.4.1
36
- */
37
- name: string;
38
- /**
39
- * Format: date-time
40
- * @description Time when this version was released
41
- */
42
- releasedAt: string;
43
- files: components["schemas"]["LibraryDownloadFile"][];
44
- };
45
- LibraryDownloadFile: {
46
- name: components["parameters"]["LibraryFileName"];
47
- /** @description Url to retrieve this file */
48
- downloadUrl: string;
49
- };
50
- /**
51
- * @description The target backend this project was developed for
52
- * @enum {string}
53
- */
54
- TargetSystem: "myDatanet" | "ONE" | "MT360";
55
- NewApplication: {
56
- /** @description The project name */
57
- name: string;
58
- /** @description Short description what this library does */
59
- description: string;
60
- targetSystem: components["schemas"]["TargetSystem"];
61
- /** @description ONE specific parameter for the organizationId */
62
- organizationId?: string;
63
- /**
64
- * @description Defines which servers are allowed to see this application. If null, the application wont be shared with anyone
65
- * @default null
66
- */
67
- allowedBackends: "*" | string[] | null;
68
- };
69
- ApplicationInformationBase: {
70
- /** @description The actual released version of the application */
71
- version: number;
72
- publisherId: components["parameters"]["PublisherId"];
73
- } & components["schemas"]["NewApplication"];
74
- ApplicationListInformation: {
75
- id: components["parameters"]["ApplicationId"];
76
- /** @description The project name */
77
- name: string;
78
- /** @description Short description what this library does */
79
- description: string;
80
- publisherId: components["parameters"]["PublisherId"];
81
- };
82
- ApplicationDetailInformation: components["schemas"]["ApplicationInformationBase"] & {
83
- versions: components["schemas"]["ApplicationVersion"][];
84
- };
85
- ApplicationVersion: {
86
- /** @description The name of the application when this version wos released */
87
- name: string;
88
- /** @description The version number */
89
- version: number;
90
- /**
91
- * Format: date-time
92
- * @description Date when this version was published
93
- */
94
- versionStamp: string;
95
- phase: components["schemas"]["ReleasePhases"];
96
- /**
97
- * Format: date-time
98
- * @description Date when the release phase was changed
99
- */
100
- phaseStamp: string;
101
- files: components["schemas"]["ApplicationDownloadFile"][];
102
- };
103
- ApplicationDownloadFile: {
104
- name: components["parameters"]["ApplicationFileName"];
105
- /** @description Url to retrieve this file */
106
- downloadUrl: string;
107
- };
108
- /** @description Information about the new version */
109
- ApplicationTagInformation: {
110
- name: string;
111
- abstract: string;
112
- phase: components["schemas"]["ReleasePhases"];
113
- /** @enum {string} */
114
- pov_location: "$embedded" | "$pure";
115
- version: number;
116
- };
117
- ApplicationVersionUpdate: {
118
- phase: components["schemas"]["ReleasePhases"];
119
- };
120
- /**
121
- * @description The released phase
122
- * @enum {string}
123
- */
124
- ReleasePhases: "passive" | "stage" | "release" | "withdrawn";
125
- NewPublisher: {
126
- /** @description Unique id of the publisher. Can not be changed afterwards. Can only contain 'A' through 'Z', 'a' through 'z', '0' through '9' and '-'. The publisher ID must start with an alphabetic or numeric character. */
127
- id: string;
128
- /** @description The name of the publisher. Your company / brand name is recommended. Should not contain following chars ';', '=', '[', ']', '@', '|', '\"', '%', '\', '/', ',', '>'. */
129
- name: string;
130
- };
131
- Publisher: {
132
- /** @description The unique id of the publisher */
133
- id: string;
134
- /** @description The name of the publisher */
135
- name: string;
136
- };
137
- /**
138
- * @description <ul> <li><b>Reader</b>: The user can view, but cannot publish or manage. <li><b>Contributor</b>: The user can publish, but cannot edit publisher settings or manage access. <li><b>Owner</b>: The user can publish, edit publisher settings, and manage access.. </ul>
139
- * @enum {string}
140
- */
141
- MemberRole: "owner" | "contributor" | "reader";
142
- NewPublisherMember: {
143
- id: components["parameters"]["MemberId"];
144
- role: components["schemas"]["MemberRole"];
145
- };
146
- PublisherMember: {
147
- id: components["parameters"]["MemberId"];
148
- /** @description Name of the member/user */
149
- name: string;
150
- role: components["schemas"]["MemberRole"];
151
- };
152
- ChangePublisherRole: {
153
- role: components["schemas"]["MemberRole"];
154
- };
155
- PublisherMemberListInformation: {
156
- meta?: components["schemas"]["ResultMeta"];
157
- data?: components["schemas"]["PublisherMember"][];
158
- };
159
- CloudStudioApplicationAssign: {
160
- /** @description Unique id of the application (rmstore id) */
161
- id: string;
162
- /** @description The current project name */
163
- name: string;
164
- targetSystem: components["schemas"]["TargetSystem"];
165
- /** @description Short project description */
166
- description: string;
167
- };
168
- ApiToken: {
169
- /** @description Unique id of the token */
170
- id: string;
171
- /** @description Clear name of the token declared by the user */
172
- label: string;
173
- /**
174
- * Format: date-time
175
- * @description Date when the token was created
176
- */
177
- createdAt: string;
178
- };
179
- NewApiToken: {
180
- /** @description The name of the token */
181
- label: string;
182
- };
183
- ApiTokenCreated: {
184
- /** @description The newly created api token */
185
- token: string;
186
- } & components["schemas"]["ApiToken"];
187
- ErrorResponse: {
188
- /** @description Information about what went/is wrong */
189
- reason: string;
190
- };
191
- };
192
- responses: never;
193
- parameters: {
194
- /** @description Limit the amount of entities that will be returned in the data array */
195
- PaginationLimit?: components["schemas"]["PaginationLimit"];
196
- /** @description Set the offset to skip the given amount of entities in the database */
197
- PaginationOffset?: number;
198
- /** @description Id of the publisher */
199
- PublisherIdQuery?: string;
200
- /** @description Id of the publisher */
201
- PublisherId: string;
202
- /** @description Unique library id for this publisher */
203
- LibraryId: string;
204
- /** @description version of the library. Formatted as semantic version */
205
- LibraryVersion: string;
206
- /** @description Filename that can be fetched */
207
- LibraryFileName: "library.tar.gz" | "README.md" | "CHANGELOG.md" | "studio.json";
208
- /** @description Unique library id for this publisher */
209
- ApplicationId: string;
210
- /** @description version of the application. */
211
- ApplicationVersion: number;
212
- /** @description version of the library. Formatted as semantic version */
213
- ApplicationFileName: "release-notes.md";
214
- /** @description User Id */
215
- MemberId: string;
216
- /** @description User Id */
217
- UserId: string;
218
- /** @description Id of theapi token */
219
- TokenId: string;
220
- };
221
- requestBodies: never;
222
- headers: never;
223
- pathItems: never;
224
- }
225
-
226
- export declare namespace Dependencies {
227
- /**
228
- * Removes the caret-range constraint from the version
229
- * @public
230
- * @param version
231
- */
232
- export function rangeToVersion(version: string): string;
233
- /**
234
- * Validate if the given version satisfies the semver-range
235
- * @param libName
236
- * @param v1
237
- * @param range
238
- * @private
239
- */
240
- export function satisfiesSemverRange(libName: string, v1: SemVer | string, range: string): void;
241
- /**
242
- * Build a dependency tree based on the manifest file and a list of dependencies that should be added
243
- * @param cwd
244
- * @param fs
245
- * @param dependenciesToAdd
246
- * @param development
247
- */
248
- export function validateDependencyTree(cwd: URI, fs: LocalFS, dependenciesToAdd?: Manifest.Dependencies, development?: boolean): Promise<Manifest.Dependencies>;
249
- /**
250
- * Validate if the given dependency is already installed
251
- * @param cwd
252
- * @param fs
253
- * @param publisherId
254
- * @param libraryName
255
- * @param libraryVersion
256
- */
257
- export function isDependencyInstalled(cwd: URI, fs: LocalFS, publisherId: string, libraryName: string, libraryVersion: string): Promise<boolean>;
258
- /**
259
- * Remove installed dependency from the libdeps directory
260
- * @param cwd
261
- * @param fs
262
- * @param libraryName
263
- */
264
- export function removeExisting(cwd: URI, fs: LocalFS, libraryName: string): Promise<void>;
265
- /**
266
- * Extract the given library.tar.gz array buffer
267
- * @param cwd
268
- * @param fs
269
- * @param libraryName
270
- * @param archiveBuffer
271
- */
272
- export function extractLibraryContent(cwd: URI, fs: LocalFS, libraryName: string, archiveBuffer: ArrayBuffer): Promise<void>;
273
- /**
274
- * Install the given library with the version that the semver range accepts
275
- * @param cwd
276
- * @param fs
277
- * @param token
278
- * @param publisherIdName
279
- * @param version
280
- * @param development - install as development dependency
281
- */
282
- export function installDependency(cwd: URI, fs: LocalFS, token: string | null, publisherIdName: string, version: string | null, development?: boolean): Promise<undefined>;
283
- /**
284
- * Install all dependencies that are referenced within the studio manifest
285
- * @param cwd
286
- * @param fs
287
- * @param token
288
- */
289
- export function installDependencies(cwd: URI, fs: LocalFS, token: string | null): Promise<void>;
290
- /**
291
- * Uninstall the given library
292
- * Validates if the library is any sub-dependency of any other library
293
- * @param cwd
294
- * @param fs
295
- * @param publisherId
296
- * @param libraryName
297
- */
298
- export function uninstallDependency(cwd: URI, fs: LocalFS, publisherId: string, libraryName: string): Promise<void>;
299
- }
300
-
301
- /**
302
- * Permissions of a file.
303
- */
304
- declare enum FilePermission {
305
- /**
306
- * The file is readonly.
307
- *
308
- * *Note:* All `FileStat` from a `FileSystemProvider` that is registered with
309
- * the option `isReadonly: true` will be implicitly handled as if `FilePermission.Readonly`
310
- * is set. As a consequence, it is not possible to have a readonly file system provider
311
- * registered where some `FileStat` are not readonly.
312
- */
313
- Readonly = 1
314
- }
315
-
316
- /**
317
- * The `FileStat`-type represents metadata about a file
318
- */
319
- declare interface FileStat {
320
- /**
321
- * The type of the file, e.g. is a regular file, a directory, or symbolic link
322
- * to a file.
323
- *
324
- * *Note:* This value might be a bitmask, e.g. `FileType.File | FileType.SymbolicLink`.
325
- */
326
- type: FileType;
327
- /**
328
- * The creation timestamp in milliseconds elapsed since January 1, 1970 00:00:00 UTC.
329
- */
330
- ctime: number;
331
- /**
332
- * The modification timestamp in milliseconds elapsed since January 1, 1970 00:00:00 UTC.
333
- *
334
- * *Note:* If the file changed, it is important to provide an updated `mtime` that advanced
335
- * from the previous value. Otherwise there may be optimizations in place that will not show
336
- * the updated file contents in an editor for example.
337
- */
338
- mtime: number;
339
- /**
340
- * The size in bytes.
341
- *
342
- * *Note:* If the file changed, it is important to provide an updated `size`. Otherwise there
343
- * may be optimizations in place that will not show the updated file contents in an editor for
344
- * example.
345
- */
346
- size: number;
347
- /**
348
- * The permissions of the file, e.g. whether the file is readonly.
349
- *
350
- * *Note:* This value might be a bitmask, e.g. `FilePermission.Readonly | FilePermission.Other`.
351
- */
352
- permissions?: FilePermission;
353
- }
354
-
355
- /**
356
- * Enumeration of file types. The types `File` and `Directory` can also be
357
- * a symbolic links, in that case use `FileType.File | FileType.SymbolicLink` and
358
- * `FileType.Directory | FileType.SymbolicLink`.
359
- */
360
- declare enum FileType {
361
- /**
362
- * The file type is unknown.
363
- */
364
- Unknown = 0,
365
- /**
366
- * A regular file.
367
- */
368
- File = 1,
369
- /**
370
- * A directory.
371
- */
372
- Directory = 2,
373
- /**
374
- * A symbolic link to a file.
375
- */
376
- SymbolicLink = 64
377
- }
378
-
379
- declare interface LocalFS {
380
- /**
381
- * Filesystem rm function. It has to remove files or paths recursive
382
- * @param path
383
- */
384
- rm: (path: URI) => Promise<any>;
385
- /**
386
- * Filesystem write function.
387
- * @param path
388
- * @param content
389
- */
390
- writeFile: (path: URI, content: Uint8Array | string) => Promise<any>;
391
- /**
392
- * Filesystem read function.
393
- * @param path
394
- */
395
- readFile: (path: URI) => Promise<Uint8Array>;
396
- stat: (path: URI) => Promise<FileStat | null>;
397
- }
398
-
399
- export declare namespace Manifest {
400
- export interface Manifest {
401
- version: string;
402
- name: string;
403
- publisher: string;
404
- description: string;
405
- legacyProject?: boolean;
406
- icon?: string;
407
- dpid?: string;
408
- engines?: {
409
- backend?: string;
410
- hwfw?: string[];
411
- productId?: string[];
412
- };
413
- library?: boolean;
414
- libraryDependencies?: Dependencies;
415
- libraryDevDependencies?: Dependencies;
416
- /**
417
- * @deprecated replaced with libraryDependencies
418
- */
419
- libdeps?: string[];
420
- dlo?: {
421
- mainFile: string;
422
- compileOptions: string[];
423
- };
424
- registry?: {
425
- id?: string;
426
- allowedBackends?: null | '*' | string[];
427
- target?: 'myDatanet' | 'ONE' | 'MT360';
428
- };
429
- /**
430
- * @deprecated moved to registry
431
- */
432
- target?: 'myDatanet' | 'ONE' | 'MT360';
433
- pov?: {
434
- details?: ApmPartScripts;
435
- };
436
- blo?: ApmPartScripts;
437
- }
438
- export interface Dependencies {
439
- [key: string]: string;
440
- }
441
- export interface ApmPartScripts {
442
- buildCommand: string;
443
- workingPath: string;
444
- }
445
- /**
446
- * Read the studio.json manifest and parse it
447
- * @param cwd
448
- * @param fs
449
- */
450
- export function read(cwd: URI, fs: LocalFS): Promise<Manifest>;
451
- /**
452
- * Write the manifest to the workspace
453
- * @param cwd
454
- * @param fs
455
- * @param manifest
456
- */
457
- export function write(cwd: URI, fs: LocalFS, manifest: Manifest): Promise<Manifest>;
458
- }
459
-
460
- export declare namespace Registry {
461
- /**
462
- * Get the actual api url based on the STUDIO_ENV
463
- */
464
- const getAPIUrl: () => {
465
- baseUrl: string;
466
- };
467
- export type LibraryProfile = components['schemas']['LibraryDetailInformation'];
468
- export type LibraryVersion = components['schemas']['LibraryVersion'];
469
- /**
470
- * Fetch the library profile of the given library
471
- * @param token
472
- * @param publisherId
473
- * @param libraryId
474
- */
475
- export function getLibraryProfile(token: string | null, publisherId: string, libraryId: string): Promise<LibraryProfile>;
476
- export function fetchLibraryContent(token: string | null, contentURL: string, json?: boolean): Promise<any>;
477
- }
478
-
479
- export { }
package/out/FS.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"FS.d.ts","sourceRoot":"","sources":["../src/FS.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,MAAM,WAAW,OAAO;IACvB;;;OAGG;IACH,EAAE,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAChC;;;;OAIG;IACH,SAAS,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,UAAU,GAAG,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACrE;;;OAGG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAC7C,IAAI,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;CAC9C;AACD;;;;GAIG;AACH,oBAAY,QAAQ;IACnB;;OAEG;IACH,OAAO,IAAI;IACX;;OAEG;IACH,IAAI,IAAI;IACR;;OAEG;IACH,SAAS,IAAI;IACb;;OAEG;IACH,YAAY,KAAK;CACjB;AAED;;GAEG;AACH,oBAAY,cAAc;IACzB;;;;;;;OAOG;IACH,QAAQ,IAAI;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACxB;;;;;OAKG;IACH,IAAI,EAAE,QAAQ,CAAC;IACf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;OAMG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC;CAC7B;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU,GAAG,GAAG,UAazD"}
package/out/FS.js DELETED
@@ -1,60 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FilePermission = exports.FileType = void 0;
4
- exports.convertBlobToString = convertBlobToString;
5
- /**
6
- * Enumeration of file types. The types `File` and `Directory` can also be
7
- * a symbolic links, in that case use `FileType.File | FileType.SymbolicLink` and
8
- * `FileType.Directory | FileType.SymbolicLink`.
9
- */
10
- var FileType;
11
- (function (FileType) {
12
- /**
13
- * The file type is unknown.
14
- */
15
- FileType[FileType["Unknown"] = 0] = "Unknown";
16
- /**
17
- * A regular file.
18
- */
19
- FileType[FileType["File"] = 1] = "File";
20
- /**
21
- * A directory.
22
- */
23
- FileType[FileType["Directory"] = 2] = "Directory";
24
- /**
25
- * A symbolic link to a file.
26
- */
27
- FileType[FileType["SymbolicLink"] = 64] = "SymbolicLink";
28
- })(FileType || (exports.FileType = FileType = {}));
29
- /**
30
- * Permissions of a file.
31
- */
32
- var FilePermission;
33
- (function (FilePermission) {
34
- /**
35
- * The file is readonly.
36
- *
37
- * *Note:* All `FileStat` from a `FileSystemProvider` that is registered with
38
- * the option `isReadonly: true` will be implicitly handled as if `FilePermission.Readonly`
39
- * is set. As a consequence, it is not possible to have a readonly file system provider
40
- * registered where some `FileStat` are not readonly.
41
- */
42
- FilePermission[FilePermission["Readonly"] = 1] = "Readonly";
43
- })(FilePermission || (exports.FilePermission = FilePermission = {}));
44
- function convertBlobToString(blob) {
45
- try {
46
- let binaryData = null;
47
- // if vscode runs in desktop mode, the blob is a serialized buffer
48
- if (blob?.type === 'Buffer') {
49
- binaryData = Uint8Array.from(blob.data);
50
- }
51
- else {
52
- binaryData = blob;
53
- }
54
- return new TextDecoder('utf8').decode(binaryData);
55
- }
56
- catch (e) {
57
- return '';
58
- }
59
- }
60
- //# sourceMappingURL=FS.js.map
package/out/api.d.ts.map DELETED
@@ -1 +0,0 @@
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;AAEzC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC"}