@positronic/template-new-project 0.0.53 → 0.0.54
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/index.js
CHANGED
|
@@ -53,10 +53,10 @@ module.exports = {
|
|
|
53
53
|
],
|
|
54
54
|
setup: async ctx => {
|
|
55
55
|
const devRootPath = process.env.POSITRONIC_LOCAL_PATH;
|
|
56
|
-
let coreVersion = '^0.0.
|
|
57
|
-
let cloudflareVersion = '^0.0.
|
|
58
|
-
let clientVercelVersion = '^0.0.
|
|
59
|
-
let genUIComponentsVersion = '^0.0.
|
|
56
|
+
let coreVersion = '^0.0.54';
|
|
57
|
+
let cloudflareVersion = '^0.0.54';
|
|
58
|
+
let clientVercelVersion = '^0.0.54';
|
|
59
|
+
let genUIComponentsVersion = '^0.0.54';
|
|
60
60
|
|
|
61
61
|
// Map backend selection to package names
|
|
62
62
|
const backendPackageMap = {
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Bundle entry point for client-side rendering.
|
|
3
3
|
*
|
|
4
|
-
* This file is bundled by esbuild into dist/components.js which exposes
|
|
4
|
+
* This file is bundled by esbuild into .positronic/dist/components.js which exposes
|
|
5
5
|
* React components to window.PositronicComponents for use by generated pages.
|
|
6
6
|
*
|
|
7
|
-
* When you add custom components to
|
|
7
|
+
* When you add custom components to components/index.ts, they will automatically
|
|
8
8
|
* be included in the bundle.
|
|
9
9
|
*/
|
|
10
|
-
import { components } from '
|
|
10
|
+
import { components } from '../components/index.js';
|
|
11
11
|
|
|
12
12
|
// Extract the React component from each UIComponent and expose to window
|
|
13
13
|
const PositronicComponents: Record<string, React.ComponentType<any>> = {};
|
package/template/_env
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# Development Environment
|
|
2
2
|
NODE_ENV=development
|
|
3
3
|
|
|
4
|
+
# Google AI API Key (required for running brains)
|
|
5
|
+
# Get your API key at https://aistudio.google.com/apikey
|
|
6
|
+
GOOGLE_GENERATIVE_AI_API_KEY=
|
|
7
|
+
|
|
4
8
|
# Cloudflare R2 Configuration
|
|
5
9
|
R2_BUCKET_NAME=<%= projectName %>
|
|
6
10
|
|
package/template/_gitignore
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* esbuild configuration for bundling UI components.
|
|
3
3
|
*
|
|
4
|
-
* This bundles the components from
|
|
4
|
+
* This bundles the components from .positronic/bundle.ts into a single
|
|
5
5
|
* JavaScript file that can be served to the browser.
|
|
6
6
|
*
|
|
7
7
|
* Run: npm run build:components
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
import * as esbuild from 'esbuild';
|
|
11
11
|
|
|
12
12
|
await esbuild.build({
|
|
13
|
-
entryPoints: ['
|
|
13
|
+
entryPoints: ['.positronic/bundle.ts'],
|
|
14
14
|
bundle: true,
|
|
15
15
|
external: ['react', 'react-dom'],
|
|
16
16
|
format: 'iife',
|
|
17
|
-
outfile: 'dist/components.js',
|
|
17
|
+
outfile: '.positronic/dist/components.js',
|
|
18
18
|
jsx: 'transform',
|
|
19
19
|
jsxFactory: 'React.createElement',
|
|
20
20
|
jsxFragment: 'React.Fragment',
|
package/template/package.json
CHANGED
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"zod": "^3.24.1",
|
|
17
17
|
"@positronic/client-vercel": "<%= positronicClientVercelVersion %>",
|
|
18
|
-
"@ai-sdk/
|
|
18
|
+
"@ai-sdk/google": "^3.0.13",
|
|
19
|
+
"ai": "^6.0.48",
|
|
19
20
|
"@positronic/core": "<%= positronicCoreVersion %>",
|
|
20
21
|
"@positronic/gen-ui-components": "<%= positronicGenUIComponentsVersion %>"<% if (backend === 'cloudflare') { %>,
|
|
21
22
|
"@positronic/cloudflare": "<%= positronicCloudflareVersion %>"<% } %>
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
"@jest/globals": "^30.0.4",
|
|
28
29
|
"ts-jest": "^29.2.6",
|
|
29
30
|
"@types/jest": "^30.0.0",
|
|
30
|
-
"esbuild": "^0.
|
|
31
|
+
"esbuild": "^0.27.2",
|
|
31
32
|
"@types/react": "^18.2.0"
|
|
32
33
|
}
|
|
33
34
|
}
|
package/template/runner.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BrainRunner } from '@positronic/core';
|
|
2
2
|
import { VercelClient } from '@positronic/client-vercel';
|
|
3
|
-
import {
|
|
3
|
+
import { google } from '@ai-sdk/google';
|
|
4
4
|
|
|
5
5
|
export const runner = new BrainRunner({
|
|
6
6
|
adapters: [],
|
|
7
|
-
client: new VercelClient(
|
|
7
|
+
client: new VercelClient(google('gemini-3-pro-preview')),
|
|
8
8
|
resources: {},
|
|
9
9
|
});
|