@cedarjs/vite 7.0.0-canary.3058 → 7.0.0-canary.3060
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.
|
@@ -16,7 +16,8 @@ import type { Plugin } from 'vite';
|
|
|
16
16
|
* export const QUERY = gql`...`
|
|
17
17
|
* export const Loading = () => <div>Loading...</div>
|
|
18
18
|
* export const Success = ({ data }) => <div>{data}</div>
|
|
19
|
-
*
|
|
19
|
+
* const MyCell = createCell({ QUERY, Loading, Success, displayName: 'MyCell' })
|
|
20
|
+
* export default MyCell
|
|
20
21
|
* ```
|
|
21
22
|
*/
|
|
22
23
|
export declare function cedarCellTransform(): Plugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite-plugin-cedar-cell.d.ts","sourceRoot":"","sources":["../../src/plugins/vite-plugin-cedar-cell.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAqBlC
|
|
1
|
+
{"version":3,"file":"vite-plugin-cedar-cell.d.ts","sourceRoot":"","sources":["../../src/plugins/vite-plugin-cedar-cell.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAqBlC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAsM3C"}
|
|
@@ -23,6 +23,7 @@ function cedarCellTransform() {
|
|
|
23
23
|
if (!id.match(/Cell\.[jt]sx?$/)) {
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
26
|
+
const cellComponentName = parsePath(id).name;
|
|
26
27
|
try {
|
|
27
28
|
const ast = parse(code, {
|
|
28
29
|
sourceType: "module",
|
|
@@ -111,20 +112,38 @@ function cedarCellTransform() {
|
|
|
111
112
|
computed: false
|
|
112
113
|
}
|
|
113
114
|
];
|
|
115
|
+
const cellVariableDeclaration = {
|
|
116
|
+
type: "VariableDeclaration",
|
|
117
|
+
kind: "const",
|
|
118
|
+
declarations: [
|
|
119
|
+
{
|
|
120
|
+
type: "VariableDeclarator",
|
|
121
|
+
id: {
|
|
122
|
+
type: "Identifier",
|
|
123
|
+
name: cellComponentName
|
|
124
|
+
},
|
|
125
|
+
init: {
|
|
126
|
+
type: "CallExpression",
|
|
127
|
+
callee: {
|
|
128
|
+
type: "Identifier",
|
|
129
|
+
name: createCellHookName
|
|
130
|
+
},
|
|
131
|
+
arguments: [
|
|
132
|
+
{
|
|
133
|
+
type: "ObjectExpression",
|
|
134
|
+
properties: objectProperties
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
};
|
|
141
|
+
path.node.body.push(cellVariableDeclaration);
|
|
114
142
|
const exportDefaultDeclaration = {
|
|
115
143
|
type: "ExportDefaultDeclaration",
|
|
116
144
|
declaration: {
|
|
117
|
-
type: "
|
|
118
|
-
|
|
119
|
-
type: "Identifier",
|
|
120
|
-
name: createCellHookName
|
|
121
|
-
},
|
|
122
|
-
arguments: [
|
|
123
|
-
{
|
|
124
|
-
type: "ObjectExpression",
|
|
125
|
-
properties: objectProperties
|
|
126
|
-
}
|
|
127
|
-
]
|
|
145
|
+
type: "Identifier",
|
|
146
|
+
name: cellComponentName
|
|
128
147
|
}
|
|
129
148
|
};
|
|
130
149
|
path.node.body.push(exportDefaultDeclaration);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/vite",
|
|
3
|
-
"version": "7.0.0-canary.
|
|
3
|
+
"version": "7.0.0-canary.3060",
|
|
4
4
|
"description": "Vite configuration package for CedarJS",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -54,17 +54,17 @@
|
|
|
54
54
|
"@babel/preset-typescript": "7.29.7",
|
|
55
55
|
"@babel/traverse": "7.29.8",
|
|
56
56
|
"@babel/types": "7.29.8",
|
|
57
|
-
"@cedarjs/api": "7.0.0-canary.
|
|
58
|
-
"@cedarjs/api-server": "7.0.0-canary.
|
|
59
|
-
"@cedarjs/babel-config": "7.0.0-canary.
|
|
60
|
-
"@cedarjs/context": "7.0.0-canary.
|
|
61
|
-
"@cedarjs/graphql-server": "7.0.0-canary.
|
|
62
|
-
"@cedarjs/internal": "7.0.0-canary.
|
|
63
|
-
"@cedarjs/jobs": "7.0.0-canary.
|
|
64
|
-
"@cedarjs/project-config": "7.0.0-canary.
|
|
65
|
-
"@cedarjs/server-store": "7.0.0-canary.
|
|
66
|
-
"@cedarjs/structure": "7.0.0-canary.
|
|
67
|
-
"@cedarjs/testing": "7.0.0-canary.
|
|
57
|
+
"@cedarjs/api": "7.0.0-canary.3060",
|
|
58
|
+
"@cedarjs/api-server": "7.0.0-canary.3060",
|
|
59
|
+
"@cedarjs/babel-config": "7.0.0-canary.3060",
|
|
60
|
+
"@cedarjs/context": "7.0.0-canary.3060",
|
|
61
|
+
"@cedarjs/graphql-server": "7.0.0-canary.3060",
|
|
62
|
+
"@cedarjs/internal": "7.0.0-canary.3060",
|
|
63
|
+
"@cedarjs/jobs": "7.0.0-canary.3060",
|
|
64
|
+
"@cedarjs/project-config": "7.0.0-canary.3060",
|
|
65
|
+
"@cedarjs/server-store": "7.0.0-canary.3060",
|
|
66
|
+
"@cedarjs/structure": "7.0.0-canary.3060",
|
|
67
|
+
"@cedarjs/testing": "7.0.0-canary.3060",
|
|
68
68
|
"@swc/core": "1.16.1",
|
|
69
69
|
"@universal-deploy/store": "^0.2.1",
|
|
70
70
|
"@universal-deploy/vite": "^0.1.9",
|
|
@@ -94,10 +94,10 @@
|
|
|
94
94
|
"yargs-parser": "21.1.1"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
|
-
"@cedarjs/auth": "7.0.0-canary.
|
|
98
|
-
"@cedarjs/framework-tools": "7.0.0-canary.
|
|
99
|
-
"@cedarjs/router": "7.0.0-canary.
|
|
100
|
-
"@cedarjs/web": "7.0.0-canary.
|
|
97
|
+
"@cedarjs/auth": "7.0.0-canary.3060",
|
|
98
|
+
"@cedarjs/framework-tools": "7.0.0-canary.3060",
|
|
99
|
+
"@cedarjs/router": "7.0.0-canary.3060",
|
|
100
|
+
"@cedarjs/web": "7.0.0-canary.3060",
|
|
101
101
|
"@dr.pogodin/react-helmet": "2.0.4",
|
|
102
102
|
"@hyrious/esbuild-plugin-commonjs": "0.2.6",
|
|
103
103
|
"@jridgewell/trace-mapping": "0.3.31",
|
|
@@ -119,9 +119,9 @@
|
|
|
119
119
|
"vitest": "4.1.11"
|
|
120
120
|
},
|
|
121
121
|
"peerDependencies": {
|
|
122
|
-
"@cedarjs/auth": "7.0.0-canary.
|
|
123
|
-
"@cedarjs/router": "7.0.0-canary.
|
|
124
|
-
"@cedarjs/web": "7.0.0-canary.
|
|
122
|
+
"@cedarjs/auth": "7.0.0-canary.3060",
|
|
123
|
+
"@cedarjs/router": "7.0.0-canary.3060",
|
|
124
|
+
"@cedarjs/web": "7.0.0-canary.3060",
|
|
125
125
|
"react": "19.2.8",
|
|
126
126
|
"react-dom": "19.2.8"
|
|
127
127
|
},
|