@positronic/cli 0.0.3 → 0.0.4
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/dist/src/commands/helpers.js +11 -25
- package/dist/types/commands/helpers.d.ts.map +1 -1
- package/package.json +5 -1
- package/dist/src/commands/brain.test.js +0 -2936
- package/dist/src/commands/helpers.test.js +0 -832
- package/dist/src/commands/project.test.js +0 -1201
- package/dist/src/commands/resources.test.js +0 -2511
- package/dist/src/commands/schedule.test.js +0 -1235
- package/dist/src/commands/secret.test.d.js +0 -1
- package/dist/src/commands/secret.test.js +0 -761
- package/dist/src/commands/server.test.js +0 -1237
- package/dist/src/commands/test-utils.js +0 -737
- package/dist/src/components/secret-sync.js +0 -303
- package/dist/src/test/mock-api-client.js +0 -371
- package/dist/src/test/test-dev-server.js +0 -1376
- package/dist/types/commands/test-utils.d.ts +0 -45
- package/dist/types/commands/test-utils.d.ts.map +0 -1
- package/dist/types/components/secret-sync.d.ts +0 -9
- package/dist/types/components/secret-sync.d.ts.map +0 -1
- package/dist/types/test/mock-api-client.d.ts +0 -25
- package/dist/types/test/mock-api-client.d.ts.map +0 -1
- package/dist/types/test/test-dev-server.d.ts +0 -129
- package/dist/types/test/test-dev-server.d.ts.map +0 -1
- package/src/cli.ts +0 -997
- package/src/commands/backend.ts +0 -63
- package/src/commands/brain.test.ts +0 -1004
- package/src/commands/brain.ts +0 -215
- package/src/commands/helpers.test.ts +0 -487
- package/src/commands/helpers.ts +0 -870
- package/src/commands/project-config-manager.ts +0 -152
- package/src/commands/project.test.ts +0 -502
- package/src/commands/project.ts +0 -109
- package/src/commands/resources.test.ts +0 -1052
- package/src/commands/resources.ts +0 -97
- package/src/commands/schedule.test.ts +0 -481
- package/src/commands/schedule.ts +0 -65
- package/src/commands/secret.test.ts +0 -210
- package/src/commands/secret.ts +0 -50
- package/src/commands/server.test.ts +0 -493
- package/src/commands/server.ts +0 -353
- package/src/commands/test-utils.ts +0 -324
- package/src/components/brain-history.tsx +0 -198
- package/src/components/brain-list.tsx +0 -105
- package/src/components/brain-rerun.tsx +0 -111
- package/src/components/brain-show.tsx +0 -92
- package/src/components/error.tsx +0 -24
- package/src/components/project-add.tsx +0 -59
- package/src/components/project-create.tsx +0 -83
- package/src/components/project-list.tsx +0 -83
- package/src/components/project-remove.tsx +0 -55
- package/src/components/project-select.tsx +0 -200
- package/src/components/project-show.tsx +0 -58
- package/src/components/resource-clear.tsx +0 -127
- package/src/components/resource-delete.tsx +0 -160
- package/src/components/resource-list.tsx +0 -177
- package/src/components/resource-sync.tsx +0 -170
- package/src/components/resource-types.tsx +0 -55
- package/src/components/resource-upload.tsx +0 -182
- package/src/components/schedule-create.tsx +0 -90
- package/src/components/schedule-delete.tsx +0 -116
- package/src/components/schedule-list.tsx +0 -186
- package/src/components/schedule-runs.tsx +0 -151
- package/src/components/secret-bulk.tsx +0 -79
- package/src/components/secret-create.tsx +0 -49
- package/src/components/secret-delete.tsx +0 -41
- package/src/components/secret-list.tsx +0 -41
- package/src/components/watch.tsx +0 -155
- package/src/hooks/useApi.ts +0 -183
- package/src/positronic.ts +0 -40
- package/src/test/data/resources/config.json +0 -1
- package/src/test/data/resources/data/config.json +0 -1
- package/src/test/data/resources/data/logo.png +0 -2
- package/src/test/data/resources/docs/api.md +0 -3
- package/src/test/data/resources/docs/readme.md +0 -3
- package/src/test/data/resources/example.md +0 -3
- package/src/test/data/resources/file with spaces.txt +0 -1
- package/src/test/data/resources/readme.md +0 -3
- package/src/test/data/resources/test.txt +0 -1
- package/src/test/mock-api-client.ts +0 -145
- package/src/test/test-dev-server.ts +0 -1003
- package/tsconfig.json +0 -11
|
@@ -225,7 +225,6 @@ import { isText } from 'istextorbinary';
|
|
|
225
225
|
import * as http from 'http';
|
|
226
226
|
import * as https from 'https';
|
|
227
227
|
import { URL } from 'url';
|
|
228
|
-
import { createMinimalProject } from './test-utils.js';
|
|
229
228
|
// Singleton API client instance
|
|
230
229
|
export var apiClient = {
|
|
231
230
|
fetch: function(apiPath, options) {
|
|
@@ -249,32 +248,18 @@ export function generateProject(projectName, projectDir) {
|
|
|
249
248
|
return _ts_generator(this, function(_state) {
|
|
250
249
|
switch(_state.label){
|
|
251
250
|
case 0:
|
|
252
|
-
if (!(process.env.NODE_ENV === 'test')) return [
|
|
253
|
-
3,
|
|
254
|
-
2
|
|
255
|
-
];
|
|
256
|
-
return [
|
|
257
|
-
4,
|
|
258
|
-
createMinimalProject(projectDir)
|
|
259
|
-
];
|
|
260
|
-
case 1:
|
|
261
|
-
_state.sent();
|
|
262
|
-
return [
|
|
263
|
-
2
|
|
264
|
-
];
|
|
265
|
-
case 2:
|
|
266
251
|
devPath = process.env.POSITRONIC_LOCAL_PATH;
|
|
267
252
|
newProjectTemplatePath = '@positronic/template-new-project';
|
|
268
253
|
cazOptions = {
|
|
269
254
|
name: projectName
|
|
270
255
|
};
|
|
271
|
-
_state.label =
|
|
272
|
-
case
|
|
256
|
+
_state.label = 1;
|
|
257
|
+
case 1:
|
|
273
258
|
_state.trys.push([
|
|
274
|
-
|
|
259
|
+
1,
|
|
275
260
|
,
|
|
276
|
-
|
|
277
|
-
|
|
261
|
+
3,
|
|
262
|
+
4
|
|
278
263
|
]);
|
|
279
264
|
if (devPath) {
|
|
280
265
|
// Copying templates, why you ask?
|
|
@@ -302,7 +287,8 @@ export function generateProject(projectName, projectDir) {
|
|
|
302
287
|
cazOptions = _object_spread_props(_object_spread({}, cazOptions), {
|
|
303
288
|
backend: 'none',
|
|
304
289
|
install: false,
|
|
305
|
-
pm: 'npm'
|
|
290
|
+
pm: 'npm',
|
|
291
|
+
claudemd: false
|
|
306
292
|
});
|
|
307
293
|
}
|
|
308
294
|
return [
|
|
@@ -311,13 +297,13 @@ export function generateProject(projectName, projectDir) {
|
|
|
311
297
|
force: false
|
|
312
298
|
}))
|
|
313
299
|
];
|
|
314
|
-
case
|
|
300
|
+
case 2:
|
|
315
301
|
_state.sent();
|
|
316
302
|
return [
|
|
317
303
|
3,
|
|
318
|
-
|
|
304
|
+
4
|
|
319
305
|
];
|
|
320
|
-
case
|
|
306
|
+
case 3:
|
|
321
307
|
// Clean up the temporary copied new project package
|
|
322
308
|
if (devPath) {
|
|
323
309
|
fs.rmSync(newProjectTemplatePath, {
|
|
@@ -329,7 +315,7 @@ export function generateProject(projectName, projectDir) {
|
|
|
329
315
|
return [
|
|
330
316
|
7
|
|
331
317
|
];
|
|
332
|
-
case
|
|
318
|
+
case 4:
|
|
333
319
|
return [
|
|
334
320
|
2
|
|
335
321
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/commands/helpers.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/commands/helpers.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAOtD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;AAGhE,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC;AAGzC,eAAO,MAAM,SAAS;qBACG,MAAM,YAAY,WAAW,KAAG,OAAO,CAAC,QAAQ,CAAC;CASzE,CAAC;AAEF,wBAAsB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAiE5E;AAED,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,aAAa,EAAE,CAsCxE;AAeD,UAAU,UAAU;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAClD;AAED,MAAM,MAAM,oBAAoB,GAAG,CAAC,QAAQ,EAAE;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,UAAU,GAAG,WAAW,GAAG,UAAU,CAAC;IAC9C,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;CAC5B,KAAK,IAAI,CAAC;AAEX;;GAEG;AACH,wBAAsB,aAAa,CACjC,eAAe,EAAE,MAAM,EACvB,MAAM,GAAE,SAAqB,EAC7B,UAAU,CAAC,EAAE,oBAAoB,GAChC,OAAO,CAAC,UAAU,CAAC,CA+KrB;AAqKD;;GAEG;AACH,wBAAsB,aAAa,CACjC,eAAe,EAAE,MAAM,EACvB,MAAM,GAAE,SAAqB,mBAoB9B;AAsCD;;GAEG;AACH,wBAAsB,cAAc,CAClC,IAAI,CAAC,EAAE,MAAM,EACb,SAAS,SAAO,GACf,OAAO,CAAC,OAAO,CAAC,CAsBlB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,0BAA0B,CAC9C,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,MAAM,GAAE,SAAqB,EAC7B,UAAU,CAAC,EAAE,gBAAgB,EAC7B,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,IAAI,CAAC,CA2If"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@positronic/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
"positronic": "./dist/src/positronic.js",
|
|
12
12
|
"px": "./dist/src/positronic.js"
|
|
13
13
|
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"package.json"
|
|
17
|
+
],
|
|
14
18
|
"scripts": {
|
|
15
19
|
"tsc": "tsc --project tsconfig.json",
|
|
16
20
|
"swc": "swc src -d dist",
|