@drayman/framework 1.9.0 → 2.0.0

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.
@@ -76,12 +76,12 @@ async function build() {
76
76
  await fs_extra_1.default.outputFile(templateFilePath, lines.join('\n'));
77
77
  for (const componentName of componentNames) {
78
78
  const script = await fs_extra_1.default.readFile(path_1.default.join(componentsDir, `${componentName}.tsx`), 'utf-8');
79
- await draymanCore.saveComponent({ script, outputFile: path_1.default.join(componentsOutputDir, `${componentName}.js`) });
79
+ await draymanCore.saveComponent({ scriptPath: path_1.default.join(process.cwd(), componentsDir, `${componentName}.tsx`), script, outputFile: path_1.default.join(componentsOutputDir, `${componentName}.js`) });
80
80
  }
81
81
  const otherFiles = files.filter(x => x.endsWith('.ts') && !x.endsWith('.d.ts'));
82
82
  for (const otherFile of otherFiles) {
83
83
  const script = await fs_extra_1.default.readFile(otherFile, 'utf-8');
84
- await draymanCore.saveComponent({ script, outputFile: path_1.default.join(outDir, `${otherFile.replace(`${srcDir}/`, '').replace('.ts', '')}.js`) });
84
+ await draymanCore.saveComponent({ script, scriptPath: otherFile, outputFile: path_1.default.join(outDir, `${otherFile.replace(`${srcDir}/`, '').replace('.ts', '')}.js`) });
85
85
  }
86
86
  }
87
87
  exports.build = build;
package/dist/index.js CHANGED
@@ -1,12 +1,30 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
6
+ }) : (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ o[k2] = m[k];
9
+ }));
10
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
11
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
12
+ }) : function(o, v) {
13
+ o["default"] = v;
14
+ });
15
+ var __importStar = (this && this.__importStar) || function (mod) {
16
+ if (mod && mod.__esModule) return mod;
17
+ var result = {};
18
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
19
+ __setModuleDefault(result, mod);
20
+ return result;
21
+ };
3
22
  var __importDefault = (this && this.__importDefault) || function (mod) {
4
23
  return (mod && mod.__esModule) ? mod : { "default": mod };
5
24
  };
6
25
  Object.defineProperty(exports, "__esModule", { value: true });
7
26
  const nodemon_1 = __importDefault(require("nodemon"));
8
27
  const path_1 = __importDefault(require("path"));
9
- const build_1 = require("./commands/build");
10
28
  const config_1 = require("./config");
11
29
  const command = process.argv[2];
12
30
  (async () => {
@@ -23,7 +41,8 @@ const command = process.argv[2];
23
41
  });
24
42
  }
25
43
  else if (command === 'build') {
26
- await (0, build_1.build)();
44
+ const { build } = await Promise.resolve().then(() => __importStar(require('./commands/build')));
45
+ await build();
27
46
  }
28
47
  else {
29
48
  throw new Error(`Unknown command.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drayman/framework",
3
- "version": "1.9.0",
3
+ "version": "2.0.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -20,7 +20,7 @@
20
20
  "author": "",
21
21
  "license": "ISC",
22
22
  "dependencies": {
23
- "@drayman/core": "^1.9.0",
23
+ "@drayman/core": "^2.0.0",
24
24
  "cup-readdir": "^1.0.3",
25
25
  "express": "^4.17.1",
26
26
  "fs-extra": "^9.1.0",
@@ -34,18 +34,18 @@
34
34
  },
35
35
  "devDependencies": {
36
36
  "@drayman/elements": "latest",
37
- "@drayman/types": "^1.8.0",
37
+ "@drayman/types": "^2.0.0",
38
38
  "@types/express": "^4.17.11",
39
39
  "@types/fs-extra": "^9.0.11",
40
40
  "@types/multer": "^1.4.5",
41
41
  "@types/nodemon": "^1.19.1",
42
42
  "@types/shortid": "0.0.29",
43
43
  "@types/ws": "^7.4.4",
44
- "cypress": "^7.2.0",
44
+ "cypress": "^8.7.0",
45
45
  "cypress-file-upload": "^5.0.7",
46
46
  "dayjs": "^1.10.4",
47
47
  "npm": "^7.10.0",
48
48
  "start-server-and-test": "^1.12.1"
49
49
  },
50
- "gitHead": "828de3167180b8e7920b86c9d44da55a7577961c"
50
+ "gitHead": "fb3bdeb5e9069eef59d8bb93ffaf08a672523447"
51
51
  }