create-squire-workspace 0.0.22 → 0.0.30
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/create-space.js +13 -0
- package/create-space.js.map +1 -0
- package/package.json +14 -8
- package/create-workspace.js +0 -25
- package/create-workspace.js.map +0 -1
- package/create-workspace.module.d.ts +0 -2
- package/create-workspace.module.js +0 -23
- package/create-workspace.module.js.map +0 -1
- package/test.command.d.ts +0 -5
- package/test.command.js +0 -16
- package/test.command.js.map +0 -1
- /package/{create-workspace.d.ts → create-space.d.ts} +0 -0
package/create-space.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
import { instance } from "@code-squire/ioc";
|
|
3
|
+
import { FeatureModuleRegistry } from "@code-squire/feature-modules";
|
|
4
|
+
import { WorkspaceModule } from "@code-squire/workspace";
|
|
5
|
+
import { SqVirtualFileSystem } from "@code-squire/vfs";
|
|
6
|
+
instance(FeatureModuleRegistry).broadcastSpecific([
|
|
7
|
+
{ module: WorkspaceModule, parameters: [] }
|
|
8
|
+
]);
|
|
9
|
+
const vfs = instance(SqVirtualFileSystem);
|
|
10
|
+
const virtualRoot = vfs.createVirtualRoot(process.cwd());
|
|
11
|
+
const virtualApi = await virtualRoot.virtualize();
|
|
12
|
+
console.log('Ready to generate with the api', !!virtualApi);
|
|
13
|
+
//# sourceMappingURL=create-space.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-space.js","sourceRoot":"","sources":["../../../../squire/create-workspace/src/create-space.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,QAAQ,CAAC,qBAAqB,CAAC,CAAC,iBAAiB,CAAC;IAChD,EAAE,MAAM,EAAE,eAAe,EAAE,UAAU,EAAE,EAAE,EAAE;CAC5C,CAAC,CAAC;AAEH,MAAM,GAAG,GAAG,QAAQ,CAAC,mBAAmB,CAAC,CAAC;AAC1C,MAAM,WAAW,GAAG,GAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;AACzD,MAAM,UAAU,GAAG,MAAM,WAAW,CAAC,UAAU,EAAE,CAAC;AAElD,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-squire-workspace",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"main": "./create-
|
|
5
|
-
"bin": "./create-
|
|
3
|
+
"version": "0.0.30",
|
|
4
|
+
"main": "./create-space.js",
|
|
5
|
+
"bin": "./create-space.js",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@code-squire/
|
|
8
|
-
"@code-squire/ioc": "latest",
|
|
7
|
+
"@code-squire/common": "latest",
|
|
9
8
|
"@code-squire/utils": "latest",
|
|
10
|
-
"@code-squire/
|
|
11
|
-
"@code-squire/
|
|
9
|
+
"@code-squire/composition": "latest",
|
|
10
|
+
"@code-squire/vfs": "latest",
|
|
11
|
+
"@code-squire/node-cli": "latest",
|
|
12
|
+
"@code-squire/typescript": "latest",
|
|
13
|
+
"@code-squire/terminal": "latest",
|
|
14
|
+
"@code-squire/feature-modules": "latest"
|
|
15
|
+
},
|
|
16
|
+
"peerDependencies": {
|
|
17
|
+
"@code-squire/ioc": "latest"
|
|
12
18
|
}
|
|
13
|
-
}
|
|
19
|
+
}
|
package/create-workspace.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env tsx
|
|
2
|
-
import { SqFileUtils, SqFolderUtils, SqPathUtils, SqProcessManager } from "@code-squire/utils";
|
|
3
|
-
import { instance } from "@code-squire/ioc";
|
|
4
|
-
import { FeatureModuleRegistry } from "@code-squire/feature-modules";
|
|
5
|
-
import { CreateWorkspaceModule } from "./create-workspace.module";
|
|
6
|
-
const packagesToInstall = [
|
|
7
|
-
"@code-squire/ioc",
|
|
8
|
-
"@code-squire/feature-modules",
|
|
9
|
-
"@code-squire/squire",
|
|
10
|
-
"@code-squire/workspace"
|
|
11
|
-
];
|
|
12
|
-
const processManager = new SqProcessManager();
|
|
13
|
-
const [name] = process.argv.slice(2);
|
|
14
|
-
if (!name)
|
|
15
|
-
throw new Error('Squire - Please pass a name for your squire space');
|
|
16
|
-
await processManager.execute(`npm install -g tsx`);
|
|
17
|
-
const workspacePath = SqPathUtils.normalize(`${process.cwd()}/${name}`);
|
|
18
|
-
SqFolderUtils.create(workspacePath);
|
|
19
|
-
process.chdir(workspacePath);
|
|
20
|
-
SqFileUtils.save(`${workspacePath}/workspace.json`, '{}');
|
|
21
|
-
await processManager.execute(`npm i -D ${packagesToInstall.join(' ')}`);
|
|
22
|
-
const registry = instance(FeatureModuleRegistry);
|
|
23
|
-
registry.broadcastSpecific({ module: CreateWorkspaceModule, parameters: [] });
|
|
24
|
-
await processManager.execute(`npx squire test-me`);
|
|
25
|
-
//# sourceMappingURL=create-workspace.js.map
|
package/create-workspace.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-workspace.js","sourceRoot":"","sources":["../../../../squire/create-workspace/src/create-workspace.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC/F,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,MAAM,iBAAiB,GAAa;IAClC,kBAAkB;IAClB,8BAA8B;IAC9B,qBAAqB;IACrB,wBAAwB;CACzB,CAAC;AAEF,MAAM,cAAc,GAAG,IAAI,gBAAgB,EAAE,CAAC;AAC9C,MAAM,CAAE,IAAI,CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACvC,IAAI,CAAC,IAAI;IAAE,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;AAEhF,MAAM,cAAc,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;AACnD,MAAM,aAAa,GAAG,WAAW,CAAC,SAAS,CAAC,GAAI,OAAO,CAAC,GAAG,EAAG,IAAK,IAAK,EAAE,CAAC,CAAC;AAC5E,aAAa,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;AAEpC,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;AAC7B,WAAW,CAAC,IAAI,CAAC,GAAI,aAAc,iBAAiB,EAAE,IAAI,CAAC,CAAC;AAC5D,MAAM,cAAc,CAAC,OAAO,CAAC,YAAa,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAE,EAAE,CAAC,CAAC;AAE1E,MAAM,QAAQ,GAAG,QAAQ,CAAC,qBAAqB,CAAC,CAAC;AACjD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,EAAE,qBAAqB,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;AAE9E,MAAM,cAAc,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { FeatureModule } from "@code-squire/feature-modules";
|
|
8
|
-
import { TestCommand } from "./test.command";
|
|
9
|
-
let CreateWorkspaceModule = class CreateWorkspaceModule {
|
|
10
|
-
};
|
|
11
|
-
CreateWorkspaceModule = __decorate([
|
|
12
|
-
FeatureModule({
|
|
13
|
-
exports: {
|
|
14
|
-
cli: {
|
|
15
|
-
registerCommands: [
|
|
16
|
-
{ packageName: 'test', commands: [TestCommand] }
|
|
17
|
-
]
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
})
|
|
21
|
-
], CreateWorkspaceModule);
|
|
22
|
-
export { CreateWorkspaceModule };
|
|
23
|
-
//# sourceMappingURL=create-workspace.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-workspace.module.js","sourceRoot":"","sources":["../../../../squire/create-workspace/src/create-workspace.module.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAWtC,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;CAAI,CAAA;AAAzB,qBAAqB;IATjC,aAAa,CAAC;QACb,OAAO,EAAE;YACP,GAAG,EAAE;gBACH,gBAAgB,EAAE;oBAChB,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAE,WAAW,CAAE,EAAE;iBACnD;aACF;SACF;KACF,CAAC;GACW,qBAAqB,CAAI"}
|
package/test.command.d.ts
DELETED
package/test.command.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { CliCommand } from "@code-squire/node-cli";
|
|
8
|
-
let TestCommand = class TestCommand {
|
|
9
|
-
};
|
|
10
|
-
TestCommand = __decorate([
|
|
11
|
-
CliCommand({
|
|
12
|
-
command: 'test-me'
|
|
13
|
-
})
|
|
14
|
-
], TestCommand);
|
|
15
|
-
export { TestCommand };
|
|
16
|
-
//# sourceMappingURL=test.command.js.map
|
package/test.command.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test.command.js","sourceRoot":"","sources":["../../../../squire/create-workspace/src/test.command.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAuB,MAAM,uBAAuB,CAAC;AAOjE,IAAM,WAAW,GAAjB,MAAM,WAAW;CAAI,CAAA;AAAf,WAAW;IAHvB,UAAU,CAAC;QACV,OAAO,EAAE,SAAS;KACnB,CAAC;GACW,WAAW,CAAI"}
|
|
File without changes
|