primate 0.34.0 → 0.35.1

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.
@@ -4,58 +4,11 @@
4
4
  "baseUrl": "${configDir}",
5
5
  "target": "esnext",
6
6
  "module": "nodenext",
7
- "moduleResolution": "nodenext",
7
+ "moduleResolution": "bundler",
8
8
  "strict": true,
9
9
  "skipLibCheck": true,
10
- "customConditions": ["apekit"],
11
10
  "erasableSyntaxOnly": true,
12
11
  "exactOptionalPropertyTypes": true,
13
- "allowImportingTsExtensions": true,
14
- "jsx": "react-jsx",
15
- "paths": {
16
- "#route/*": ["routes/*"],
17
- "#component/*": [
18
- "components/*",
19
- "components/*.tsx",
20
- "components/*.jsx",
21
- "components/*.vue",
22
- "components/*.svelte",
23
- "components/*.component.ts",
24
- "components/*.ts",
25
- "components/*.js"
26
- ],
27
- "#hook/*": ["hooks/*", "hooks/*.ts", "hooks/*.js"],
28
- "#lib/*": ["lib/*", "lib/*.ts", "lib/*.js"],
29
- "#store/*": ["stores/*", "stores/*.ts", "stores/*.js"],
30
- "#locale/*": ["locales/*", "locales/*.ts", "locales/*.js"],
31
- "#module/*": ["modules/*", "modules/*.ts", "modules/*.js"],
32
- "#config/*": ["config/*", "config/*.ts", "config/*.js"],
33
- "#static/*": ["static/*", "static/*.ts", "static/*.js"],
34
- "#database/*": ["config/database/*.ts", "config/database/*.js"],
35
- "#app": ["config/app.ts", "config/app.js"],
36
- "#session": ["config/session.ts", "config/session.js"],
37
- "#i18n": ["config/i18n.ts", "config/i18n.js"],
38
- "#database": [
39
- "config/database/index.ts",
40
- "config/database/index.js",
41
- "config/database/default.js",
42
- "config/database/default.ts"
43
- ]
44
- }
45
- },
46
- "include": [
47
- "${configDir}/config",
48
- "${configDir}/routes",
49
- "${configDir}/views",
50
- "${configDir}/components",
51
- "${configDir}/hooks",
52
- "${configDir}/lib",
53
- "${configDir}/stores",
54
- "${configDir}/modules",
55
- "${configDir}/test",
56
- "${configDir}/static",
57
- "${configDir}/primate.config.js",
58
- "${configDir}/primate.config.ts"
59
- ],
60
- "exclude": ["node_modules"]
12
+ "allowImportingTsExtensions": true
13
+ }
61
14
  }
@@ -1,4 +1,3 @@
1
1
  import type Mode from "@primate/core/Mode";
2
- declare const _default: (flags: string[], mode?: Mode) => Promise<true | undefined>;
3
- export default _default;
2
+ export default function app(flags: string[], mode?: Mode): Promise<true | undefined>;
4
3
  //# sourceMappingURL=build.d.ts.map
@@ -1,9 +1,13 @@
1
1
  import build from "@primate/core/build";
2
- const T_FLAG = "--target=";
2
+ import get_flag from "./get-flag.js";
3
3
  // build for production
4
- export default (flags, mode = "production") => {
5
- const target = flags.find(f => f.startsWith(T_FLAG))?.slice(T_FLAG.length)
6
- ?? "web";
7
- return build(mode, target);
8
- };
4
+ export default function app(flags, mode = "production") {
5
+ const build_flags = {
6
+ mode: mode,
7
+ target: get_flag(flags, "target"),
8
+ dir: get_flag(flags, "dir"),
9
+ };
10
+ return build(build_flags);
11
+ }
12
+ ;
9
13
  //# sourceMappingURL=build.js.map
@@ -1,3 +1,3 @@
1
- declare const _default: () => Promise<void>;
1
+ declare const _default: () => Promise<true | undefined>;
2
2
  export default _default;
3
3
  //# sourceMappingURL=dev.d.ts.map
@@ -1,8 +1,4 @@
1
1
  import build from "./build.js";
2
- import serve from "./serve.js";
3
- // build for development and serve
4
- export default async () => {
5
- // will only serve is build is successful
6
- await build(["--target=web"], "development") === true && serve();
7
- };
2
+ // build for development
3
+ export default () => build([], "development");
8
4
  //# sourceMappingURL=dev.js.map
@@ -0,0 +1,2 @@
1
+ export default function get_flag(flags: string[], option: string): string | undefined;
2
+ //# sourceMappingURL=get-flag.d.ts.map
@@ -0,0 +1,5 @@
1
+ export default function get_flag(flags, option) {
2
+ const flag = `--${option}=`;
3
+ return flags.find(f => f.startsWith(flag))?.slice(flag.length);
4
+ }
5
+ //# sourceMappingURL=get-flag.js.map
@@ -1,3 +1,5 @@
1
- declare const _default: (name: string) => ((flags: string[], mode?: import("@primate/core/Mode").default) => Promise<true | undefined>) | (() => Promise<any>);
1
+ import { default as build } from "./build.js";
2
+ import { default as serve } from "./serve.js";
3
+ declare const _default: (name: string) => typeof build | typeof serve;
2
4
  export default _default;
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,12 +1,16 @@
1
+ import dim from "@rcompat/cli/color/dim";
2
+ import green from "@rcompat/cli/color/green";
1
3
  import cancel from "@rcompat/cli/prompts/cancel";
2
4
  import intro from "@rcompat/cli/prompts/intro";
3
- import isCancel from "@rcompat/cli/prompts/is-cancel";
5
+ import is_cancel from "@rcompat/cli/prompts/is-cancel";
4
6
  import multiselect from "@rcompat/cli/prompts/multiselect";
5
7
  import outro from "@rcompat/cli/prompts/outro";
6
8
  import select from "@rcompat/cli/prompts/select";
7
9
  import text from "@rcompat/cli/prompts/text";
8
10
  import FileRef from "@rcompat/fs/FileRef";
9
- import dedent from "@rcompat/string/dedent";
11
+ function abort() {
12
+ return cancel("Aborted");
13
+ }
10
14
  const FRONTEND_OPTIONS = [
11
15
  { label: "Angular", value: "angular" },
12
16
  { label: "Eta", value: "eta" },
@@ -56,34 +60,33 @@ export default async function init() {
56
60
  let directory;
57
61
  let target;
58
62
  while (true) {
59
- const ans = await text({ message: "Directory to create app?", initial: "." });
60
- if (typeof ans === "symbol" || isCancel(ans))
61
- return cancel("Aborted.");
63
+ const ans = await text({
64
+ message: "Directory to create app?", initial: ".",
65
+ });
66
+ if (typeof ans === "symbol" || is_cancel(ans))
67
+ return abort();
62
68
  target = new FileRef(ans);
63
69
  if (await empty(target)) {
64
70
  directory = ans;
65
- break; // Valid directory found, exit loop
71
+ break; // valid directory found, exit loop
66
72
  }
67
- // Directory not empty, show error but continue loop
73
+ // directory not empty, show error but continue loop
68
74
  console.log("Directory not empty, choose another.");
69
75
  }
70
- // frontends — Enter = skip (none)
71
- const fronts = await multiselect({
76
+ const frontends = await multiselect({
72
77
  message: "Choose frontend (press Enter to skip)",
73
78
  options: FRONTEND_OPTIONS,
74
- initial: [], // indices
79
+ initial: [],
75
80
  });
76
- if (typeof fronts === "symbol" || isCancel(fronts))
77
- return cancel("Aborted.");
78
- // backends — Enter = skip (none)
79
- const backs = await multiselect({
81
+ if (typeof frontends === "symbol" || is_cancel(frontends))
82
+ return abort();
83
+ const backends = await multiselect({
80
84
  message: "Choose backend (press Enter to skip)",
81
85
  options: BACKEND_OPTIONS,
82
- initial: [], // indices
86
+ initial: [],
83
87
  });
84
- if (typeof backs === "symbol" || isCancel(backs))
85
- return cancel("Aborted.");
86
- // runtime (must choose one)
88
+ if (typeof backends === "symbol" || is_cancel(backends))
89
+ return abort();
87
90
  const runtime = await select({
88
91
  message: "Choose runtime",
89
92
  options: [
@@ -93,18 +96,16 @@ export default async function init() {
93
96
  ],
94
97
  initial: 0,
95
98
  });
96
- if (typeof runtime === "symbol" || isCancel(runtime))
97
- return cancel("Aborted.");
98
- // database — Enter = skip (none); if multiple chosen, take the first
99
- const dbChoices = await multiselect({
99
+ if (typeof runtime === "symbol" || is_cancel(runtime))
100
+ return abort();
101
+ const dbs = await multiselect({
100
102
  message: "Choose a database (press Enter to skip)",
101
103
  options: DATABASE_OPTIONS,
102
- initial: [], // indices
104
+ initial: [],
103
105
  });
104
- if (typeof dbChoices === "symbol" || isCancel(dbChoices))
105
- return cancel("Aborted.");
106
- const db = dbChoices[0];
107
- // i18n
106
+ if (typeof dbs === "symbol" || is_cancel(dbs))
107
+ return abort();
108
+ const db = dbs[0];
108
109
  const i18n = await select({
109
110
  message: "Enable i18n?",
110
111
  options: [
@@ -113,10 +114,9 @@ export default async function init() {
113
114
  ],
114
115
  initial: 1,
115
116
  });
116
- if (typeof i18n === "symbol" || isCancel(i18n))
117
- return cancel("Aborted.");
118
- const withI18n = i18n === "yes";
119
- // sessions
117
+ if (typeof i18n === "symbol" || is_cancel(i18n))
118
+ return abort();
119
+ const with_i18n = i18n === "yes";
120
120
  const sessions = await select({
121
121
  message: "Configure sessions?",
122
122
  options: [
@@ -125,32 +125,28 @@ export default async function init() {
125
125
  ],
126
126
  initial: 1,
127
127
  });
128
- if (typeof sessions === "symbol" || isCancel(sessions))
129
- return cancel("Aborted.");
128
+ if (typeof sessions === "symbol" || is_cancel(sessions))
129
+ return abort();
130
130
  const withSessions = sessions === "yes";
131
- // scaffold dirs
132
131
  await target.create({ recursive: true });
133
132
  await target.join("routes").create({ recursive: true });
134
133
  await target.join("views").create({ recursive: true });
135
- if (db)
134
+ if (db !== undefined)
136
135
  await target.join("stores").create({ recursive: true });
137
136
  // files
138
137
  await gitignore(target);
139
- await tsconfig_json(target);
140
- await app_config(target, { fronts, backs, runtime });
141
- if (withI18n)
138
+ await tsconfig_json(target, { frontends });
139
+ await app_config(target, { frontends: frontends, backends: backends, runtime });
140
+ if (with_i18n)
142
141
  await i18n_config(target);
143
142
  if (withSessions)
144
143
  await session_config(target);
145
144
  if (db)
146
145
  await database_config(target, db);
147
146
  await package_json(target, { directory, runtime });
148
- const packages = compute_packages({ fronts, backs, db });
149
- const install = buildInstallCommand(runtime, packages, directory);
150
- outro([
151
- "Done, now run",
152
- `\n ${install.print}`,
153
- ].join("\n"));
147
+ const packages = compute_packages({ frontends: frontends, backends: backends, db });
148
+ const install = build_install_command(runtime, packages, directory);
149
+ outro(`${green("done, now run")} ${dim(install.print)}`);
154
150
  process.exit();
155
151
  }
156
152
  async function empty(directory) {
@@ -182,29 +178,28 @@ async function gitignore(root) {
182
178
  await gi.write(content);
183
179
  }
184
180
  async function app_config(root, c) {
185
- const cfg = root.join("config").join("app.ts");
186
- await cfg.directory.create({ recursive: true });
187
- const frontendImports = c.fronts
188
- .map((f) => `import ${toIdent(f)} from "@primate/${f}";`)
181
+ const config = root.join("config").join("app.ts");
182
+ await config.directory.create({ recursive: true });
183
+ const frontend_imports = c.frontends
184
+ .map((f) => `import ${to_ident(f)} from "@primate/${f}";`)
189
185
  .join("\n");
190
- const backendImports = c.backs
191
- .map((b) => `import ${toIdent(b)} from "@primate/${b}";`)
186
+ const backend_imports = c.backends
187
+ .map((b) => `import ${to_ident(b)} from "@primate/${b}";`)
192
188
  .join("\n");
193
189
  const modules = [
194
- ...c.fronts.map((f) => `${toIdent(f)}()`),
195
- ...c.backs.map((b) => `${toIdent(b)}()`),
190
+ ...c.frontends.map((f) => `${to_ident(f)}()`),
191
+ ...c.backends.map((b) => `${to_ident(b)}()`),
196
192
  ];
197
- const body = dedent `import config from "primate/config";
198
- ${frontendImports}
199
- ${backendImports}
193
+ const body = `import config from "primate/config";
194
+ ${frontend_imports}
195
+ ${backend_imports}
200
196
 
201
197
  export default config({
202
198
  modules: [
203
199
  ${modules.join(",\n ")}
204
200
  ],
205
- });
206
- `;
207
- await cfg.write(body);
201
+ });`;
202
+ await config.write(body);
208
203
  }
209
204
  // i18n scaffold: config + a default locale file
210
205
  async function i18n_config(root) {
@@ -214,12 +209,10 @@ async function i18n_config(root) {
214
209
  await en_us.directory.create({ recursive: true });
215
210
  await i18i.directory.create({ recursive: true });
216
211
  const locale = `import locale from "primate/i18n/locale";
217
-
218
212
  export default locale({
219
213
  hi: "Hello",
220
214
  placeheld: "Hello, {name}",
221
- });
222
- `;
215
+ });`;
223
216
  await en_us.write(locale);
224
217
  const config = `import en from "#locale/en-US";
225
218
  import i18n from "primate/config/i18n";
@@ -229,27 +222,22 @@ export default i18n({
229
222
  locales: {
230
223
  "en-US": en,
231
224
  },
232
- });
233
- `;
225
+ });`;
234
226
  await i18i.write(config);
235
227
  }
236
228
  async function session_config(root) {
237
229
  const file = root.join("config").join("session.ts");
238
230
  await file.directory.create({ recursive: true });
239
231
  const body = `import session from "primate/config/session";
240
-
241
- export default session({});
242
- `;
232
+ export default session({});`;
243
233
  await file.write(body);
244
234
  }
245
235
  async function database_config(root, db) {
246
236
  const file = root.join("config").join("database").join("index.ts");
247
237
  await file.directory.create({ recursive: true });
248
- const ident = toIdent(db);
238
+ const ident = to_ident(db);
249
239
  const body = `import ${ident} from "@primate/${db}";
250
-
251
- export default ${ident}();
252
- `;
240
+ export default ${ident}();`;
253
241
  await file.write(body);
254
242
  }
255
243
  async function package_json(root, c) {
@@ -283,78 +271,111 @@ function safe(s) {
283
271
  return s.trim().toLowerCase().replace(/\s+/g, "-")
284
272
  .replace(/[^a-z0-9._-]/g, "") || "primate-app";
285
273
  }
286
- function toIdent(token) {
274
+ function to_ident(token) {
287
275
  // turn tokens like "web-components" into valid identifiers: "web_components"
288
276
  return token.replace(/[^a-zA-Z0-9_$]/g, "_");
289
277
  }
290
278
  function compute_packages(args) {
291
279
  const deps = new Set();
292
- const devDeps = new Set();
280
+ const dev_deps = new Set();
293
281
  deps.add("primate");
294
282
  // Always add TypeScript as dev dependency
295
- devDeps.add("typescript");
283
+ dev_deps.add("typescript");
296
284
  // frontends → @primate/<token> (+ peer deps)
297
- for (const f of args.fronts) {
285
+ for (const f of args.frontends) {
298
286
  deps.add(`@primate/${f}`);
299
287
  const extras = FRONTEND_PEER_DEPS[f] || [];
300
288
  for (const extra of extras)
301
289
  deps.add(extra);
302
290
  }
291
+ if (args.frontends.includes("svelte")) {
292
+ dev_deps.add("@plsp/svelte");
293
+ }
303
294
  // backends → @primate/<token>
304
- for (const b of args.backs) {
295
+ for (const b of args.backends)
305
296
  deps.add(`@primate/${b}`);
306
- }
307
297
  // database → @primate/<token>, if selected
308
298
  if (args.db)
309
299
  deps.add(`@primate/${args.db}`);
310
300
  return {
311
301
  dependencies: Array.from(deps),
312
- devDependencies: Array.from(devDeps),
302
+ dev_dependencies: Array.from(dev_deps),
313
303
  };
314
304
  }
315
- function shQuote(p) {
305
+ function sh_quote(p) {
316
306
  // POSIX shell-safe quoting
317
307
  return `'${p.replace(/'/g, "'\\''")}'`;
318
308
  }
319
- function buildInstallCommand(runtime, packages, dir) {
320
- const { dependencies, devDependencies } = packages;
321
- const allPkgs = [...dependencies, ...devDependencies];
322
- if (allPkgs.length === 0) {
309
+ function build_install_command(runtime, packages, dir) {
310
+ const { dependencies, dev_dependencies } = packages;
311
+ const all_pkgs = [...dependencies, ...dev_dependencies];
312
+ if (all_pkgs.length === 0) {
323
313
  return { print: "No packages to install.", run: "" };
324
314
  }
325
- const cd = `cd ${shQuote(dir)} && `;
315
+ const cd = dir === "." ? "" : `cd ${sh_quote(dir)} && `;
326
316
  if (runtime === "bun") {
327
- const depCmd = dependencies.length > 0
317
+ const dep_cmd = dependencies.length > 0
328
318
  ? `bun add ${dependencies.join(" ")}`
329
319
  : "";
330
- const devCmd = devDependencies.length > 0
331
- ? `bun add -d ${devDependencies.join(" ")}`
320
+ const dev_cmd = dev_dependencies.length > 0
321
+ ? `bun add -d ${dev_dependencies.join(" ")}`
332
322
  : "";
333
- const commands = [depCmd, devCmd].filter(Boolean);
323
+ const commands = [dep_cmd, dev_cmd].filter(Boolean);
334
324
  return { print: cd + commands.join(" && "), run: "" };
335
325
  }
336
326
  if (runtime === "deno") {
337
- const depCmd = dependencies.length > 0
327
+ const dep_cmd = dependencies.length > 0
338
328
  ? `deno add ${dependencies.map(d => `npm:${d}`).join(" ")}`
339
329
  : "";
340
- const devCmd = devDependencies.length > 0
341
- ? `deno add -D ${devDependencies.map(d => `npm:${d}`).join(" ")}`
330
+ const dev_cmd = dev_dependencies.length > 0
331
+ ? `deno add -D ${dev_dependencies.map(d => `npm:${d}`).join(" ")}`
342
332
  : "";
343
- const commands = [depCmd, devCmd].filter(Boolean);
333
+ const commands = [dep_cmd, dev_cmd].filter(Boolean);
344
334
  return { print: cd + commands.join(" && "), run: "" };
345
335
  }
346
- const depCmd = dependencies.length > 0 ?
336
+ const dep_cmd = dependencies.length > 0 ?
347
337
  `npm install ${dependencies.join(" ")}`
348
338
  : "";
349
- const devCmd = devDependencies.length > 0
350
- ? `npm install -D ${devDependencies.join(" ")}`
339
+ const dev_cmd = dev_dependencies.length > 0
340
+ ? `npm install -D ${dev_dependencies.join(" ")}`
351
341
  : "";
352
- const commands = [depCmd, devCmd].filter(Boolean);
342
+ const commands = [dep_cmd, dev_cmd].filter(Boolean);
353
343
  return { print: cd + commands.join(" && "), run: "" };
354
344
  }
355
- async function tsconfig_json(root) {
356
- await root.join("tsconfig.json").writeJSON({
345
+ async function tsconfig_json(root, opts) {
346
+ const is_react = opts.frontends.includes("react");
347
+ const is_svelte = opts.frontends.includes("svelte");
348
+ const tsconfig = {
357
349
  extends: "primate/tsconfig",
358
- });
350
+ compilerOptions: {
351
+ baseUrl: "${configDir}",
352
+ paths: {
353
+ "#config/*": ["config/*"],
354
+ "#session": ["config/session"],
355
+ "#i18n": ["config/i18n"],
356
+ "#view/*": ["views/*"],
357
+ "#component/*": ["components/*"],
358
+ "#store/*": ["stores/*"],
359
+ "#locale/*": ["locales/*"],
360
+ "#static/*": ["static/*"],
361
+ },
362
+ },
363
+ include: [
364
+ "config",
365
+ "views",
366
+ "components",
367
+ "routes",
368
+ "stores",
369
+ "locales",
370
+ "static",
371
+ "test",
372
+ ],
373
+ exclude: ["node_modules"],
374
+ };
375
+ if (is_react)
376
+ tsconfig.compilerOptions.jsx = "react-jsx";
377
+ if (is_svelte)
378
+ tsconfig.compilerOptions.plugins = [{ name: "@plsp/svelte" }];
379
+ await root.join("tsconfig.json").writeJSON(tsconfig);
359
380
  }
360
381
  //# sourceMappingURL=init.js.map
@@ -1,3 +1,2 @@
1
- declare const _default: () => Promise<any>;
2
- export default _default;
1
+ export default function app(flags?: string[]): Promise<any>;
3
2
  //# sourceMappingURL=serve.d.ts.map
@@ -1,5 +1,6 @@
1
1
  import FileRef from "@rcompat/fs/FileRef";
2
- import root from "@rcompat/package/root";
2
+ import root from "@rcompat/fs/project/root";
3
+ import get_flag from "./get-flag.js";
3
4
  const load = async () => {
4
5
  try {
5
6
  return await root();
@@ -9,5 +10,8 @@ const load = async () => {
9
10
  }
10
11
  };
11
12
  // serve from build directory
12
- export default async () => (await load()).join("./build/serve.js").import();
13
+ export default async function app(flags = []) {
14
+ const dir = get_flag(flags, "dir") ?? "build";
15
+ return (await load()).join(`./${dir}/server.js`).import();
16
+ }
13
17
  //# sourceMappingURL=serve.js.map
@@ -2,7 +2,7 @@ import { tests } from "#test";
2
2
  import build from "@primate/core/build";
3
3
  import green from "@rcompat/cli/color/green";
4
4
  import red from "@rcompat/cli/color/red";
5
- import root from "@rcompat/package/root";
5
+ import root from "@rcompat/fs/project/root";
6
6
  import entries from "@rcompat/record/entries";
7
7
  import equals from "@rcompat/test/equals";
8
8
  import includes from "@rcompat/test/includes";
@@ -18,7 +18,7 @@ const first_error = (left, right) => {
18
18
  }
19
19
  };
20
20
  export default async () => {
21
- await build("testing", "web");
21
+ await build({ mode: "testing" });
22
22
  const app = (await serve()).default;
23
23
  const files = await (await root()).join(directory)
24
24
  .list(({ path }) => path.endsWith(".ts") || path.endsWith(".js"));
package/lib/init.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import blue from "@rcompat/cli/color/blue";
2
2
  import bold from "@rcompat/cli/color/bold";
3
3
  import print from "@rcompat/cli/print";
4
- import json from "@rcompat/package/json";
4
+ import pkg from "@rcompat/fs/project/package";
5
5
  import find from "./commands/index.js";
6
6
  export default async (...args) => {
7
7
  const [command, ...flags] = args;
8
- const { name, version, } = await (await json(import.meta.url)).json();
8
+ const { name, version, } = await (await pkg(import.meta.url)).json();
9
9
  print(blue(bold(name)), blue(version), "\n");
10
10
  find(command)(flags);
11
11
  };
@@ -0,0 +1,2 @@
1
+ export { default } from "@primate/core/database/Store";
2
+ //# sourceMappingURL=Store.d.ts.map
@@ -0,0 +1,2 @@
1
+ export { default } from "@primate/core/database/Store";
2
+ //# sourceMappingURL=Store.js.map
@@ -0,0 +1,2 @@
1
+ export { default } from "@rcompat/fs/FileRef";
2
+ //# sourceMappingURL=FileRef.d.ts.map
@@ -0,0 +1,2 @@
1
+ export { default } from "@rcompat/fs/FileRef";
2
+ //# sourceMappingURL=FileRef.js.map
@@ -0,0 +1,2 @@
1
+ export { default } from "pema";
2
+ //# sourceMappingURL=pema.d.ts.map
@@ -0,0 +1,2 @@
1
+ export { default } from "pema";
2
+ //# sourceMappingURL=pema.js.map
@@ -1,5 +1,6 @@
1
1
  import binary from "@primate/core/response/binary";
2
2
  import error from "@primate/core/response/error";
3
+ import view from "@primate/core/response/view";
3
4
  export type { default as ViewResponse } from "@primate/core/frontend/ViewResponse";
4
5
  export type { default as ResponseFunction } from "@primate/core/response/ResponseFunction";
5
6
  export type { default as ServeApp } from "@primate/core/ServeApp";
@@ -15,7 +16,7 @@ declare const _default: {
15
16
  }): undefined;
16
17
  }, init?: ResponseInit) => (app: import("@primate/core/ServeApp").default) => import("@rcompat/type/MaybePromise").default<Response>;
17
18
  text: (body: string, init?: ResponseInit) => (app: import("@primate/core/ServeApp").default) => import("@rcompat/type/MaybePromise").default<Response>;
18
- view: import("@primate/core/frontend/ViewResponse").default;
19
+ view: typeof view;
19
20
  ws: (actions: import("@rcompat/http/Actions").default) => import("@primate/core/response/ResponseFunction").default;
20
21
  };
21
22
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primate",
3
- "version": "0.34.0",
3
+ "version": "0.35.1",
4
4
  "description": "The universal web framework",
5
5
  "homepage": "https://primate.run",
6
6
  "bugs": "https://github.com/primate-run/primate/issues",
@@ -19,18 +19,17 @@
19
19
  },
20
20
  "devDependencies": {
21
21
  "@rcompat/record": "^0.9.1",
22
- "pema": "^0.3.0"
22
+ "pema": "^0.4.0"
23
23
  },
24
24
  "dependencies": {
25
25
  "@rcompat/args": "^0.8.0",
26
26
  "@rcompat/cli": "^0.11.3",
27
- "@rcompat/fs": "^0.21.1",
28
- "@rcompat/http": "~0.15.1",
29
- "@rcompat/package": "^0.22.0",
27
+ "@rcompat/fs": "^0.22.3",
28
+ "@rcompat/http": "~0.16.0",
30
29
  "@rcompat/runtime": "^0.6.0",
31
30
  "@rcompat/string": "^0.10.0",
32
31
  "@rcompat/test": "^0.5.0",
33
- "@primate/core": "^0.3.0"
32
+ "@primate/core": "^0.4.4"
34
33
  },
35
34
  "engines": {
36
35
  "node": ">=20"
@@ -1,2 +0,0 @@
1
- export { default } from "@primate/core/Loader";
2
- //# sourceMappingURL=Loader.d.ts.map
@@ -1,2 +0,0 @@
1
- export { default } from "@primate/core/Loader";
2
- //# sourceMappingURL=Loader.js.map
@@ -1,4 +0,0 @@
1
- import type Path from "@rcompat/fs/Path";
2
- declare const _default: (path: Path, ...paths: Path[]) => Promise<string>;
3
- export default _default;
4
- //# sourceMappingURL=load-text.d.ts.map
@@ -1,3 +0,0 @@
1
- import FileRef from "@rcompat/fs/FileRef";
2
- export default (path, ...paths) => FileRef.join(path, ...paths).text();
3
- //# sourceMappingURL=load-text.js.map
@@ -1,2 +0,0 @@
1
- export { default } from "@primate/core/session/Manager";
2
- //# sourceMappingURL=Manager.d.ts.map
@@ -1,2 +0,0 @@
1
- export { default } from "@primate/core/session/Manager";
2
- //# sourceMappingURL=Manager.js.map