primate 0.38.0 → 0.39.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.
@@ -200,14 +200,14 @@ async function i18n_config(root) {
200
200
  const i18i = root.join("config").join("i18n.ts");
201
201
  await en_us.directory.create();
202
202
  await i18i.directory.create();
203
- const locale = `import locale from "primate/i18n/locale";
204
- export default locale({
203
+ const locale = `import i18n from "primate/i18n";
204
+ export default i18n.locale({
205
205
  hi: "Hello",
206
206
  placeheld: "Hello, {name}",
207
207
  });`;
208
208
  await en_us.write(locale);
209
209
  const config = `import en from "#locale/en-US";
210
- import i18n from "primate/config/i18n";
210
+ import i18n from "primate/i18n";
211
211
 
212
212
  export default i18n({
213
213
  defaultLocale: "en-US",
@@ -220,12 +220,12 @@ export default i18n({
220
220
  async function session_config(root) {
221
221
  const file = root.join("config").join("session.ts");
222
222
  await file.directory.create();
223
- const body = `import session from "primate/config/session";
223
+ const body = `import session from "primate/session";
224
224
  export default session({});`;
225
225
  await file.write(body);
226
226
  }
227
227
  async function database_config(root, db) {
228
- const file = root.join("config").join("database").join("index.ts");
228
+ const file = root.join("config").join("db.ts");
229
229
  await file.directory.create();
230
230
  const ident = to_ident(db);
231
231
  const body = `import ${ident} from "@primate/${db}";
@@ -344,17 +344,20 @@ async function tsconfig_json(root, opts) {
344
344
  compilerOptions: {
345
345
  baseUrl: "${configDir}",
346
346
  paths: {
347
- "#config/*": ["config/*"],
348
347
  "#session": ["config/session"],
348
+ "#db": ["config/db"],
349
349
  "#i18n": ["config/i18n"],
350
+ "#config/*": ["config/*"],
350
351
  "#view/*": ["views/*"],
351
352
  "#component/*": ["components/*"],
353
+ "#route/*": ["routes/*"],
352
354
  "#store/*": ["stores/*"],
353
355
  "#locale/*": ["locales/*"],
354
356
  "#static/*": ["static/*"],
355
357
  },
356
358
  },
357
359
  include: [
360
+ "client",
358
361
  "config",
359
362
  "views",
360
363
  "components",
@@ -362,7 +365,6 @@ async function tsconfig_json(root, opts) {
362
365
  "stores",
363
366
  "locales",
364
367
  "static",
365
- "test",
366
368
  ],
367
369
  exclude: ["node_modules"],
368
370
  };
@@ -0,0 +1,2 @@
1
+ export { default } from "@primate/core/i18n";
2
+ //# sourceMappingURL=i18n.d.ts.map
@@ -0,0 +1,2 @@
1
+ export { default } from "@primate/core/i18n";
2
+ //# sourceMappingURL=i18n.js.map
@@ -0,0 +1,2 @@
1
+ export { default } from "@primate/core/loader";
2
+ //# sourceMappingURL=loader.d.ts.map
@@ -0,0 +1,2 @@
1
+ export { default } from "@primate/core/loader";
2
+ //# sourceMappingURL=loader.js.map
@@ -0,0 +1,2 @@
1
+ export { default } from "@primate/core/session";
2
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1,2 @@
1
+ export { default } from "@primate/core/session";
2
+ //# sourceMappingURL=session.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primate",
3
- "version": "0.38.0",
3
+ "version": "0.39.0",
4
4
  "description": "The universal web framework",
5
5
  "homepage": "https://primate.run",
6
6
  "bugs": "https://github.com/primate-run/primate/issues",
@@ -17,7 +17,6 @@
17
17
  "/lib/**/*.d.ts",
18
18
  "!/**/*.spec.*"
19
19
  ],
20
- "bin": "lib/bin.js",
21
20
  "types": "lib/index.d.ts",
22
21
  "dependencies": {
23
22
  "@rcompat/cli": "^0.24.0",
@@ -28,7 +27,7 @@
28
27
  "@rcompat/is": "^0.11.0",
29
28
  "@rcompat/runtime": "^0.16.0",
30
29
  "@rcompat/test": "^0.17.0",
31
- "@primate/core": "^0.7.0"
30
+ "@primate/core": "^0.8.0"
32
31
  },
33
32
  "devDependencies": {
34
33
  "@rcompat/type": "^0.17.0"
@@ -59,8 +58,11 @@
59
58
  }
60
59
  },
61
60
  "scripts": {
62
- "build": "npm run clean && tsc && cp src/app.tsconfig.json lib && cp src/types/app.d.ts lib && cp src/types/index.d.ts lib",
61
+ "build": "npm run clean && tsgo && cp src/app.tsconfig.json lib && cp src/types/app.d.ts lib && cp src/types/index.d.ts lib",
63
62
  "clean": "rm -rf ./lib",
64
63
  "lint": "eslint ."
64
+ },
65
+ "bin": {
66
+ "primate": "lib/bin.js"
65
67
  }
66
68
  }
@@ -1,2 +0,0 @@
1
- export { default } from "@primate/core/i18n/config";
2
- //# sourceMappingURL=i18n.d.ts.map
@@ -1,2 +0,0 @@
1
- export { default } from "@primate/core/i18n/config";
2
- //# sourceMappingURL=i18n.js.map
@@ -1,2 +0,0 @@
1
- export { default } from "@primate/core/session/config";
2
- //# sourceMappingURL=session.d.ts.map
@@ -1,2 +0,0 @@
1
- export { default } from "@primate/core/session/config";
2
- //# sourceMappingURL=session.js.map
@@ -1,2 +0,0 @@
1
- export { default } from "@primate/core/i18n/locale";
2
- //# sourceMappingURL=locale.d.ts.map
@@ -1,2 +0,0 @@
1
- export { default } from "@primate/core/i18n/locale";
2
- //# sourceMappingURL=locale.js.map
@@ -1,2 +0,0 @@
1
- export { default } from "@primate/core/route/hook";
2
- //# sourceMappingURL=hook.d.ts.map
@@ -1,2 +0,0 @@
1
- export { default } from "@primate/core/route/hook";
2
- //# sourceMappingURL=hook.js.map
@@ -1,2 +0,0 @@
1
- export { default } from "@primate/core/i18n/sInternal";
2
- //# sourceMappingURL=internal.d.ts.map
@@ -1,2 +0,0 @@
1
- export { default } from "@primate/core/i18n/sInternal";
2
- //# sourceMappingURL=internal.js.map