create-appsemble 0.20.27 → 0.20.29
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 +4 -4
- package/index.js +0 -0
- package/package.json +2 -2
- package/templates/mini-jsx/package.json +1 -1
- package/templates/preact/package.json +2 -2
- package/templates/vanilla/package.json +1 -1
- package/changed/added/.gitkeep +0 -0
- package/changed/changed/.gitkeep +0 -0
- package/changed/deprecated/.gitkeep +0 -0
- package/changed/fixed/.gitkeep +0 -0
- package/changed/removed/.gitkeep +0 -0
- package/changed/security/.gitkeep +0 -0
- package/commands/block.js.map +0 -1
- package/commands/block.ts +0 -78
- package/index.js.map +0 -1
- package/index.ts +0 -26
- package/jest.config.js +0 -3
- package/tsconfig.json +0 -6
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#  Appsemble Create
|
|
2
2
|
|
|
3
3
|
> Bootstrap an Appsemble block
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/create-appsemble)
|
|
6
|
-
[](https://gitlab.com/appsemble/appsemble/-/releases/0.20.29)
|
|
7
|
+
[](https://codecov.io/gl/appsemble/appsemble)
|
|
8
8
|
[](https://prettier.io)
|
|
9
9
|
|
|
10
10
|
## Usage
|
|
@@ -31,5 +31,5 @@ npm init appsemble block
|
|
|
31
31
|
|
|
32
32
|
## License
|
|
33
33
|
|
|
34
|
-
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.20.
|
|
34
|
+
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.20.29/LICENSE.md) ©
|
|
35
35
|
[Appsemble](https://appsemble.com)
|
package/index.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-appsemble",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.29",
|
|
4
4
|
"description": "Bootstrap an Appsemble project",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"app",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"test": "NODE_OPTIONS=--experimental-vm-modules jest"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@appsemble/node-utils": "0.20.
|
|
36
|
+
"@appsemble/node-utils": "0.20.29",
|
|
37
37
|
"inquirer": "^9.0.0",
|
|
38
38
|
"type-fest": "^2.0.0",
|
|
39
39
|
"yargs": "^17.0.0"
|
package/changed/added/.gitkeep
DELETED
|
File without changes
|
package/changed/changed/.gitkeep
DELETED
|
File without changes
|
|
File without changes
|
package/changed/fixed/.gitkeep
DELETED
|
File without changes
|
package/changed/removed/.gitkeep
DELETED
|
File without changes
|
|
File without changes
|
package/commands/block.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"block.js","sourceRoot":"","sources":["block.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,QAAQ,MAAM,UAAU,CAAC;AAIhC,OAAO,GAAG,MAAM,iBAAiB,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAC;AAE1D,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,eAAe,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE9D,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC;AAC/B,MAAM,CAAC,MAAM,WAAW,GAAG,kCAAkC,CAAC;AAQ9D,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,KAAW;IACvC,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,CAAC;IAE3C,OAAO,KAAK;SACT,MAAM,CAAC,cAAc,EAAE;QAC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,SAAS,CAAC,CAAC;IACnD,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,QAAQ,CAAc,OAAO,CAAC,CAAC;IACxD,MAAM,SAAS,GAAG;QAChB,IAAI,EAAE,IAAI,YAAY,IAAI,IAAI,EAAE;QAChC,OAAO;QACP,GAAG,QAAQ;KACZ,CAAC;IACF,MAAM,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE;QAC9B,YAAY,EAAE,IAAI;QAClB,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,cAAc,CAAC;QAC9C,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC;IACH,MAAM,SAAS,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,EAAE,SAAS,CAAC,CAAC;IAC7D,MAAM,CAAC,IAAI,CAAC,yBAAyB,YAAY,IAAI,IAAI,IAAI,OAAO,OAAO,UAAU,EAAE,CAAC,CAAC;AAC3F,CAAC"}
|
package/commands/block.ts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { cp, readdir } from 'node:fs/promises';
|
|
2
|
-
import { join } from 'node:path';
|
|
3
|
-
|
|
4
|
-
import { logger, readData, writeData } from '@appsemble/node-utils';
|
|
5
|
-
import inquirer from 'inquirer';
|
|
6
|
-
import { PackageJson } from 'type-fest';
|
|
7
|
-
import { Argv } from 'yargs';
|
|
8
|
-
|
|
9
|
-
import pkg from '../package.json' assert { type: 'json' };
|
|
10
|
-
|
|
11
|
-
const templateDir = new URL('../templates/', import.meta.url);
|
|
12
|
-
|
|
13
|
-
export const command = 'block';
|
|
14
|
-
export const description = 'Bootstrap a new Appsemble block.';
|
|
15
|
-
|
|
16
|
-
interface BlockArgs {
|
|
17
|
-
organization?: string;
|
|
18
|
-
name?: string;
|
|
19
|
-
template?: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export async function builder(yargs: Argv): Promise<Argv<any>> {
|
|
23
|
-
const choices = await readdir(templateDir);
|
|
24
|
-
|
|
25
|
-
return yargs
|
|
26
|
-
.option('organization', {
|
|
27
|
-
describe: 'The ID the block should be created for.',
|
|
28
|
-
})
|
|
29
|
-
.option('name', {
|
|
30
|
-
describe: 'The name of the block',
|
|
31
|
-
})
|
|
32
|
-
.option('template', {
|
|
33
|
-
describe: 'The template to use.',
|
|
34
|
-
choices,
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export async function handler(args: BlockArgs): Promise<void> {
|
|
39
|
-
const choices = await readdir(templateDir);
|
|
40
|
-
const answers = await inquirer.prompt(
|
|
41
|
-
[
|
|
42
|
-
!args.organization && {
|
|
43
|
-
name: 'organization',
|
|
44
|
-
message: 'For which organization is the block?',
|
|
45
|
-
},
|
|
46
|
-
!args.name && { name: 'name', message: 'What should be the name of the block?' },
|
|
47
|
-
!args.template && {
|
|
48
|
-
name: 'template',
|
|
49
|
-
type: 'list',
|
|
50
|
-
choices,
|
|
51
|
-
message: 'What kind of block project should be bootstrapped?',
|
|
52
|
-
},
|
|
53
|
-
].filter(Boolean),
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
const organization = answers.organization || args.organization;
|
|
57
|
-
const name = answers.name || args.name;
|
|
58
|
-
const template = answers.template || args.template;
|
|
59
|
-
|
|
60
|
-
const { version } = pkg;
|
|
61
|
-
const outputPath = join(process.cwd(), 'blocks', name);
|
|
62
|
-
const inputPath = new URL(`${template}/`, templateDir);
|
|
63
|
-
const pkgPath = new URL('package.json', inputPath);
|
|
64
|
-
const [inputPkg] = await readData<PackageJson>(pkgPath);
|
|
65
|
-
const outputPkg = {
|
|
66
|
-
name: `@${organization}/${name}`,
|
|
67
|
-
version,
|
|
68
|
-
...inputPkg,
|
|
69
|
-
};
|
|
70
|
-
await cp(inputPath, outputPath, {
|
|
71
|
-
errorOnExist: true,
|
|
72
|
-
filter: (src) => !src.endsWith('package.json'),
|
|
73
|
-
force: false,
|
|
74
|
-
recursive: true,
|
|
75
|
-
});
|
|
76
|
-
await writeData(join(outputPath, 'package.json'), outputPkg);
|
|
77
|
-
logger.info(`Successfully created @${organization}/${name}/${version} at ${outputPath}`);
|
|
78
|
-
}
|
package/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAwB,MAAM,OAAO,CAAC;AAE7C,OAAO,KAAK,KAAK,MAAM,qBAAqB,CAAC;AAC7C,OAAO,GAAG,MAAM,gBAAgB,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAC;AAEzD,KAAK,EAAE;KACJ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;KACpB,MAAM,CAAC,SAAS,EAAE;IACjB,KAAK,EAAE,GAAG;IACV,QAAQ,EAAE,oBAAoB;IAC9B,IAAI,EAAE,OAAO;CACd,CAAC;KACD,MAAM,CAAC,OAAO,EAAE;IACf,KAAK,EAAE,GAAG;IACV,QAAQ,EAAE,oBAAoB;IAC9B,IAAI,EAAE,OAAO;CACd,CAAC;KACD,UAAU,CAAC,CAAC,eAAe,CAAC,CAAC;KAC7B,OAAO,CAAC,KAAiC,CAAC;KAC1C,aAAa,CAAC,CAAC,CAAC;KAChB,IAAI,CAAC,WAAW,CAAC;KACjB,IAAI,EAAE;KACN,UAAU,EAAE;KACZ,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
package/index.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { configureLogger, handleError } from '@appsemble/node-utils';
|
|
3
|
-
import yargs, { CommandModule } from 'yargs';
|
|
4
|
-
|
|
5
|
-
import * as block from './commands/block.js';
|
|
6
|
-
import pkg from './package.json' assert { type: 'json' };
|
|
7
|
-
|
|
8
|
-
yargs()
|
|
9
|
-
.version(pkg.version)
|
|
10
|
-
.option('verbose', {
|
|
11
|
-
alias: 'v',
|
|
12
|
-
describe: 'Increase verbosity',
|
|
13
|
-
type: 'count',
|
|
14
|
-
})
|
|
15
|
-
.option('quiet', {
|
|
16
|
-
alias: 'q',
|
|
17
|
-
describe: 'Decrease verbosity',
|
|
18
|
-
type: 'count',
|
|
19
|
-
})
|
|
20
|
-
.middleware([configureLogger])
|
|
21
|
-
.command(block as unknown as CommandModule)
|
|
22
|
-
.demandCommand(1)
|
|
23
|
-
.fail(handleError)
|
|
24
|
-
.help()
|
|
25
|
-
.completion()
|
|
26
|
-
.parse(process.argv.slice(2));
|
package/jest.config.js
DELETED