create-appsemble 0.20.8 → 0.20.11

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.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,17 +1,20 @@
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.handler = exports.builder = exports.description = exports.command = void 0;
4
- const fs_1 = require("fs");
7
+ const promises_1 = require("fs/promises");
5
8
  const path_1 = require("path");
6
9
  const node_utils_1 = require("@appsemble/node-utils");
7
10
  const fs_extra_1 = require("fs-extra");
8
- const inquirer_1 = require("inquirer");
9
- const readPackageJson_1 = require("../lib/readPackageJson");
10
- const templateDir = (0, path_1.resolve)(__dirname, '../../templates');
11
+ const inquirer_1 = __importDefault(require("inquirer"));
12
+ const package_json_1 = __importDefault(require("../package.json"));
13
+ const templateDir = (0, path_1.resolve)(__dirname, '../templates');
11
14
  exports.command = 'block';
12
15
  exports.description = 'Bootstrap a new Appsemble block.';
13
16
  async function builder(yargs) {
14
- const choices = await fs_1.promises.readdir(templateDir);
17
+ const choices = await (0, promises_1.readdir)(templateDir);
15
18
  return yargs
16
19
  .option('organization', {
17
20
  describe: 'The ID the block should be created for.',
@@ -26,8 +29,8 @@ async function builder(yargs) {
26
29
  }
27
30
  exports.builder = builder;
28
31
  async function handler(args) {
29
- const choices = await fs_1.promises.readdir(templateDir);
30
- const answers = await (0, inquirer_1.prompt)([
32
+ const choices = await (0, promises_1.readdir)(templateDir);
33
+ const answers = await inquirer_1.default.prompt([
31
34
  !args.organization && {
32
35
  name: 'organization',
33
36
  message: 'For which organization is the block?',
@@ -43,7 +46,7 @@ async function handler(args) {
43
46
  const organization = answers.organization || args.organization;
44
47
  const name = answers.name || args.name;
45
48
  const template = answers.template || args.template;
46
- const { version } = await (0, readPackageJson_1.readPackageJson)();
49
+ const { version } = package_json_1.default;
47
50
  const outputPath = (0, path_1.join)(process.cwd(), 'blocks', name);
48
51
  const inputPath = (0, path_1.join)(templateDir, template);
49
52
  const pkgPath = (0, path_1.join)(inputPath, 'package.json');
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block.js","sourceRoot":"","sources":["block.ts"],"names":[],"mappings":";;;;;;AAAA,0CAAsC;AACtC,+BAAqC;AAErC,sDAAoE;AACpE,uCAAgC;AAChC,wDAAgC;AAIhC,mEAAkC;AAElC,MAAM,WAAW,GAAG,IAAA,cAAO,EAAC,SAAS,EAAE,cAAc,CAAC,CAAC;AAE1C,QAAA,OAAO,GAAG,OAAO,CAAC;AAClB,QAAA,WAAW,GAAG,kCAAkC,CAAC;AAQvD,KAAK,UAAU,OAAO,CAAC,KAAW;IACvC,MAAM,OAAO,GAAG,MAAM,IAAA,kBAAO,EAAC,WAAW,CAAC,CAAC;IAE3C,OAAO,KAAK;SACT,MAAM,CAAC,cAAc,EAAE;QACtB,QAAQ,EAAE,yCAAyC;KACpD,CAAC;SACD,MAAM,CAAC,MAAM,EAAE;QACd,QAAQ,EAAE,uBAAuB;KAClC,CAAC;SACD,MAAM,CAAC,UAAU,EAAE;QAClB,QAAQ,EAAE,sBAAsB;QAChC,OAAO;KACR,CAAC,CAAC;AACP,CAAC;AAdD,0BAcC;AAEM,KAAK,UAAU,OAAO,CAAC,IAAe;IAC3C,MAAM,OAAO,GAAG,MAAM,IAAA,kBAAO,EAAC,WAAW,CAAC,CAAC;IAC3C,MAAM,OAAO,GAAG,MAAM,kBAAQ,CAAC,MAAM,CACnC;QACE,CAAC,IAAI,CAAC,YAAY,IAAI;YACpB,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE,sCAAsC;SAChD;QACD,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,uCAAuC,EAAE;QAChF,CAAC,IAAI,CAAC,QAAQ,IAAI;YAChB,IAAI,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1
+ import { readdir } from 'fs/promises';
2
+ import { join, resolve } from 'path';
3
+
4
+ import { logger, readData, writeData } from '@appsemble/node-utils';
5
+ import { copy } from 'fs-extra';
6
+ import inquirer from 'inquirer';
7
+ import { PackageJson } from 'type-fest';
8
+ import { Argv } from 'yargs';
9
+
10
+ import pkg from '../package.json';
11
+
12
+ const templateDir = resolve(__dirname, '../templates');
13
+
14
+ export const command = 'block';
15
+ export const description = 'Bootstrap a new Appsemble block.';
16
+
17
+ interface BlockArgs {
18
+ organization?: string;
19
+ name?: string;
20
+ template?: string;
21
+ }
22
+
23
+ export async function builder(yargs: Argv): Promise<Argv<any>> {
24
+ const choices = await readdir(templateDir);
25
+
26
+ return yargs
27
+ .option('organization', {
28
+ describe: 'The ID the block should be created for.',
29
+ })
30
+ .option('name', {
31
+ describe: 'The name of the block',
32
+ })
33
+ .option('template', {
34
+ describe: 'The template to use.',
35
+ choices,
36
+ });
37
+ }
38
+
39
+ export async function handler(args: BlockArgs): Promise<void> {
40
+ const choices = await readdir(templateDir);
41
+ const answers = await inquirer.prompt(
42
+ [
43
+ !args.organization && {
44
+ name: 'organization',
45
+ message: 'For which organization is the block?',
46
+ },
47
+ !args.name && { name: 'name', message: 'What should be the name of the block?' },
48
+ !args.template && {
49
+ name: 'template',
50
+ type: 'list',
51
+ choices,
52
+ message: 'What kind of block project should be bootstrapped?',
53
+ },
54
+ ].filter(Boolean),
55
+ );
56
+
57
+ const organization = answers.organization || args.organization;
58
+ const name = answers.name || args.name;
59
+ const template = answers.template || args.template;
60
+
61
+ const { version } = pkg;
62
+ const outputPath = join(process.cwd(), 'blocks', name);
63
+ const inputPath = join(templateDir, template);
64
+ const pkgPath = join(inputPath, 'package.json');
65
+ const [inputPkg] = await readData<PackageJson>(pkgPath);
66
+ const outputPkg = {
67
+ name: `@${organization}/${name}`,
68
+ version,
69
+ ...inputPkg,
70
+ };
71
+ await copy(inputPath, outputPath, { filter: (src) => src !== pkgPath });
72
+ await writeData(join(outputPath, 'package.json'), outputPkg);
73
+ logger.info(`Successfully created @${organization}/${name}/${version} at ${outputPath}`);
74
+ }
File without changes
@@ -30,31 +30,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
30
30
  const node_utils_1 = require("@appsemble/node-utils");
31
31
  const yargs_1 = __importDefault(require("yargs"));
32
32
  const block = __importStar(require("./commands/block"));
33
- function main() {
34
- return yargs_1.default
35
- .option('verbose', {
36
- alias: 'v',
37
- describe: 'Increase verbosity',
38
- type: 'count',
39
- })
40
- .option('quiet', {
41
- alias: 'q',
42
- describe: 'Decrease verbosity',
43
- type: 'count',
44
- })
45
- .middleware([node_utils_1.configureLogger])
46
- .command(block)
47
- .demandCommand(1)
48
- .fail(node_utils_1.handleError)
49
- .help()
50
- .completion().argv;
51
- }
52
- if (module === require.main) {
53
- try {
54
- main();
55
- }
56
- catch (error) {
57
- node_utils_1.logger.error(error);
58
- }
59
- }
33
+ yargs_1.default
34
+ .option('verbose', {
35
+ alias: 'v',
36
+ describe: 'Increase verbosity',
37
+ type: 'count',
38
+ })
39
+ .option('quiet', {
40
+ alias: 'q',
41
+ describe: 'Decrease verbosity',
42
+ type: 'count',
43
+ })
44
+ .middleware([node_utils_1.configureLogger])
45
+ .command(block)
46
+ .demandCommand(1)
47
+ .fail(node_utils_1.handleError)
48
+ .help()
49
+ .completion()
50
+ .parse(process.argv.slice(2));
60
51
  //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,sDAAqE;AACrE,kDAA0B;AAE1B,wDAA0C;AAE1C,eAAK;KACF,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,4BAAe,CAAC,CAAC;KAC7B,OAAO,CAAC,KAAK,CAAC;KACd,aAAa,CAAC,CAAC,CAAC;KAChB,IAAI,CAAC,wBAAW,CAAC;KACjB,IAAI,EAAE;KACN,UAAU,EAAE;KACZ,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC"}
package/index.ts ADDED
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env node
2
+ import { configureLogger, handleError } from '@appsemble/node-utils';
3
+ import yargs from 'yargs';
4
+
5
+ import * as block from './commands/block';
6
+
7
+ yargs
8
+ .option('verbose', {
9
+ alias: 'v',
10
+ describe: 'Increase verbosity',
11
+ type: 'count',
12
+ })
13
+ .option('quiet', {
14
+ alias: 'q',
15
+ describe: 'Decrease verbosity',
16
+ type: 'count',
17
+ })
18
+ .middleware([configureLogger])
19
+ .command(block)
20
+ .demandCommand(1)
21
+ .fail(handleError)
22
+ .help()
23
+ .completion()
24
+ .parse(process.argv.slice(2));
package/jest.config.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('../../config/jest/config')(__dirname);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-appsemble",
3
- "version": "0.20.8",
3
+ "version": "0.20.11",
4
4
  "description": "Bootstrap an Appsemble project",
5
5
  "keywords": [
6
6
  "app",
@@ -20,18 +20,19 @@
20
20
  },
21
21
  "license": "LGPL-3.0-only",
22
22
  "author": "Appsemble <info@appsemble.com> (https://appsemble.com)",
23
- "main": "dist",
24
- "bin": "dist/index.js",
23
+ "bin": "index.js",
25
24
  "files": [
26
- "dist",
25
+ "**/*.d.ts",
26
+ "**/*.js",
27
+ "!*.config.js",
27
28
  "templates"
28
29
  ],
29
30
  "scripts": {
30
- "prepack": "tsc -p tsconfig.build.json",
31
+ "prepack": "tsc --noEmit false",
31
32
  "test": "jest"
32
33
  },
33
34
  "dependencies": {
34
- "@appsemble/node-utils": "0.20.8",
35
+ "@appsemble/node-utils": "0.20.11",
35
36
  "fs-extra": "^10.0.0",
36
37
  "inquirer": "^8.0.0",
37
38
  "type-fest": "^2.0.0",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": true,
3
3
  "dependencies": {
4
- "@appsemble/sdk": "0.20.8",
4
+ "@appsemble/sdk": "0.20.11",
5
5
  "mini-jsx": "^3.0.0"
6
6
  }
7
7
  }
@@ -27,7 +27,7 @@ bootstrap(({ events, parameters: { fields }, utils: { fa, remap } }) => {
27
27
  <div className={`has-text-weight-bold ${styles.value}`}>
28
28
  {remap(value, data) as string}
29
29
  </div>
30
- {remappedLabel && <div>{remappedLabel}</div>}
30
+ {remappedLabel ? <div>{remappedLabel}</div> : null}
31
31
  </div>
32
32
  );
33
33
  }),
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "private": true,
3
3
  "dependencies": {
4
- "@appsemble/preact": "0.20.8",
5
- "@appsemble/sdk": "0.20.8",
4
+ "@appsemble/preact": "0.20.11",
5
+ "@appsemble/sdk": "0.20.11",
6
6
  "preact": "^10.0.0"
7
7
  }
8
8
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "private": true,
3
3
  "dependencies": {
4
- "@appsemble/sdk": "0.20.8"
4
+ "@appsemble/sdk": "0.20.11"
5
5
  }
6
6
  }
@@ -1,12 +1,12 @@
1
1
  import { bootstrap } from '@appsemble/sdk';
2
2
 
3
3
  /**
4
- * @param {Object} actions - Prepared actions the block can dispatch.
5
- * @param {Object} data - The data that was somehow passed into the block. I.e. data passed in from
4
+ * @param {Object} actions Prepared actions the block can dispatch.
5
+ * @param {Object} data The data that was somehow passed into the block. I.e. data passed in from
6
6
  * another block.
7
- * @param {Object} events - Event related functions and constants.
8
- * @param {Object} pageParameters - Parameters that the app creator defined in the app definition.
9
- * @param {Object} utils - Some utility functions provided by the Appsemble framework.
7
+ * @param {Object} events Event related functions and constants.
8
+ * @param {Object} pageParameters Parameters that the app creator defined in the app definition.
9
+ * @param {Object} utils Some utility functions provided by the Appsemble framework.
10
10
  */
11
11
  bootstrap(({ actions, data, events, pageParameters, shadowRoot, utils }) => {
12
12
  const button = document.createElement('button');
package/tsconfig.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": "../../tsconfig",
3
+ "compilerOptions": {
4
+ "module": "commonjs",
5
+ "types": ["jest", "node"]
6
+ }
7
+ }
@@ -1 +0,0 @@
1
- {"version":3,"file":"block.js","sourceRoot":"","sources":["../../src/commands/block.ts"],"names":[],"mappings":";;;AAAA,2BAAoC;AACpC,+BAAqC;AAErC,sDAAoE;AACpE,uCAAgC;AAChC,uCAAkC;AAIlC,4DAAyD;AAEzD,MAAM,WAAW,GAAG,IAAA,cAAO,EAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;AAE7C,QAAA,OAAO,GAAG,OAAO,CAAC;AAClB,QAAA,WAAW,GAAG,kCAAkC,CAAC;AAQvD,KAAK,UAAU,OAAO,CAAC,KAAW;IACvC,MAAM,OAAO,GAAG,MAAM,aAAE,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAE9C,OAAO,KAAK;SACT,MAAM,CAAC,cAAc,EAAE;QACtB,QAAQ,EAAE,yCAAyC;KACpD,CAAC;SACD,MAAM,CAAC,MAAM,EAAE;QACd,QAAQ,EAAE,uBAAuB;KAClC,CAAC;SACD,MAAM,CAAC,UAAU,EAAE;QAClB,QAAQ,EAAE,sBAAsB;QAChC,OAAO;KACR,CAAC,CAAC;AACP,CAAC;AAdD,0BAcC;AAEM,KAAK,UAAU,OAAO,CAAC,IAAe;IAC3C,MAAM,OAAO,GAAG,MAAM,aAAE,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAC9C,MAAM,OAAO,GAAG,MAAM,IAAA,iBAAM,EAC1B;QACE,CAAC,IAAI,CAAC,YAAY,IAAI;YACpB,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE,sCAAsC;SAChD;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C,CAAC;IAC7D,mBAAM,CAAC,IAAI,CAAC,yBAAyB,YAAY,IAAI,IAAI,IAAI,OAAO,OAAO,UAAU,EAAE,CAAC,CAAC;AAC3F,CAAC;AAnCD,0BAmCC"}
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,sDAA6E;AAC7E,kDAA0B;AAE1B,wDAA0C;AAE1C,SAAS,IAAI;IACX,OAAO,eAAK;SACT,MAAM,CAAC,SAAS,EAAE;QACjB,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE,oBAAoB;QAC9B,IAAI,EAAE,OAAO;KACd,CAAC;SACD,MAAM,CAAC,OAAO,EAAE;QACf,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE,oBAAoB;QAC9B,IAAI,EAAE,OAAO;KACd,CAAC;SACD,UAAU,CAAC,CAAC,4BAAe,CAAC,CAAC;SAC7B,OAAO,CAAC,KAAK,CAAC;SACd,aAAa,CAAC,CAAC,CAAC;SAChB,IAAI,CAAC,wBAAW,CAAC;SACjB,IAAI,EAAE;SACN,UAAU,EAAE,CAAC,IAAI,CAAC;AACvB,CAAC;AAED,IAAI,MAAM,KAAK,OAAO,CAAC,IAAI,EAAE;IAC3B,IAAI;QACF,IAAI,EAAE,CAAC;KACR;IAAC,OAAO,KAAc,EAAE;QACvB,mBAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;KACrB;CACF"}
@@ -1,9 +0,0 @@
1
- import { PackageJson } from 'type-fest';
2
- /**
3
- * Read package.json
4
- *
5
- * TypeScript doesn’t allow importing files from outside of rootDir.
6
- *
7
- * @returns The contents of package.json
8
- */
9
- export declare function readPackageJson(): Promise<PackageJson>;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.readPackageJson = void 0;
4
- const node_utils_1 = require("@appsemble/node-utils");
5
- /**
6
- * Read package.json
7
- *
8
- * TypeScript doesn’t allow importing files from outside of rootDir.
9
- *
10
- * @returns The contents of package.json
11
- */
12
- async function readPackageJson() {
13
- const [pkg] = await (0, node_utils_1.readData)(require.resolve('../../package.json'));
14
- return pkg;
15
- }
16
- exports.readPackageJson = readPackageJson;
17
- //# sourceMappingURL=readPackageJson.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"readPackageJson.js","sourceRoot":"","sources":["../../src/lib/readPackageJson.ts"],"names":[],"mappings":";;;AAAA,sDAAiD;AAGjD;;;;;;GAMG;AACI,KAAK,UAAU,eAAe;IACnC,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,IAAA,qBAAQ,EAAc,OAAO,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC;IACjF,OAAO,GAAG,CAAC;AACb,CAAC;AAHD,0CAGC"}