@wix/origami-cli-commands 0.0.0-stage → 2.47.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.
- package/README.md +11 -2
- package/dist/flows/biome_wasm_bg.wasm +4 -0
- package/dist/flows/index.cjs +167352 -0
- package/dist/flows/index.cjs.map +7 -0
- package/dist/global.mjs +2 -0
- package/dist/project.mjs +2 -0
- package/package.json +55 -3
- package/templates/page-v1/index.jsx.ejs +11 -0
- package/templates/page-v2/index.jsx.ejs +1 -0
- package/templates/site-v2/.claude/skills/wix-site-edit/SKILL.md +10 -0
- package/templates/site-v2/.nvmrc +1 -0
- package/templates/site-v2/AGENTS.md +5 -0
- package/templates/site-v2/CLAUDE.md +3 -0
- package/templates/site-v2/README.md.ejs +25 -0
- package/templates/site-v2/src/site/_generated/client.jsx +5 -0
- package/templates/site-v2/yarn.lock +1 -0
- package/templates/snippets/componentFile.jsx.ejs +8 -0
- package/templates/snippets/pageComponent.jsx.ejs +32 -0
- package/templates/static-site-v1/.claude/skills/wix-site-edit/SKILL.md +10 -0
- package/templates/static-site-v1/.nvmrc +1 -0
- package/templates/static-site-v1/AGENTS.md +5 -0
- package/templates/static-site-v1/CLAUDE.md +3 -0
- package/templates/static-site-v1/src/site/document.html.ejs +12 -0
- package/templates/static-site-v1/vite.config.js +7 -0
- package/templates/static-site-v1/yarn.lock +1 -0
package/dist/global.mjs
ADDED
package/dist/project.mjs
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,58 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/origami-cli-commands",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "2.47.1",
|
|
4
|
+
"description": "Origami commands for the Wix CLI: the global flow (wix flows add origami) and the project flow of exported sites",
|
|
5
|
+
"main": "dist/global.mjs",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./dist/global.mjs",
|
|
8
|
+
"./project": "./dist/project.mjs",
|
|
9
|
+
"./package.json": "./package.json"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"templates",
|
|
14
|
+
"README.md",
|
|
15
|
+
"!**/*.tsbuildinfo"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "node scripts/build.mjs",
|
|
19
|
+
"lint": "oxlint .",
|
|
20
|
+
"test": "vitest run",
|
|
21
|
+
"clean": "rm -rf dist templates"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@wix/origami-site-express": "1.0.0"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/node": "^22.0.0",
|
|
28
|
+
"@wix/origami-cli": "0.1.0",
|
|
29
|
+
"vitest": "^4.1.11"
|
|
30
|
+
},
|
|
31
|
+
"publishUnscoped": false,
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"registry": "https://registry.npmjs.org/",
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"wix": {
|
|
37
|
+
"artifact": {
|
|
38
|
+
"groupId": "com.wixpress.npm",
|
|
39
|
+
"artifactId": "origami-cli-commands",
|
|
40
|
+
"targets": {
|
|
41
|
+
"docker": false
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"validations": {
|
|
45
|
+
"source": [
|
|
46
|
+
"lint"
|
|
47
|
+
],
|
|
48
|
+
"postBuild": [
|
|
49
|
+
"test"
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"engines": {
|
|
54
|
+
"node": ">=20.11.0"
|
|
55
|
+
},
|
|
56
|
+
"type": "module",
|
|
57
|
+
"falconPackageHash": "140943c4c5c53d627d269db2f2fe7d506ddab443808b924b46c07323"
|
|
6
58
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { createRoot } from 'react-dom/client'
|
|
3
|
+
import { PilerPage } from '@wix/builder-piler-components'
|
|
4
|
+
import { initializeAuth } from '<%= context.siteImport %>/wixAuth.js'
|
|
5
|
+
import <%= context.componentName %> from './<%= context.componentName %>.jsx'
|
|
6
|
+
;(async () => {
|
|
7
|
+
await initializeAuth()
|
|
8
|
+
createRoot(document.getElementById('root')).render(
|
|
9
|
+
React.createElement(React.StrictMode, null, React.createElement(PilerPage, { Page: <%= context.componentName %> }))
|
|
10
|
+
)
|
|
11
|
+
})()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './<%= context.componentName %>.jsx'
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wix-site-edit
|
|
3
|
+
description: Applies Wix Editor-compatible practices for layout, style, animations, and components on an exported Wix site. Prefer native Wix solutions and Site Style/Brand; fall back to Custom/Global CSS, then the editor-react-component skill. Use for every change to the site: JSX structure, CSS, pages, components, interactions, or build.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Wix site edits
|
|
7
|
+
|
|
8
|
+
The instructions for this skill ship in the `@wix/origami-skills` package. Read `node_modules/@wix/origami-skills/skills/wix-site-edit/SKILL.md` and follow it. It sends you to its guides and to the other skills in `node_modules/@wix/origami-skills/skills/`.
|
|
9
|
+
|
|
10
|
+
If that file is missing, run `yarn install` from the workspace root first. Do not edit the site without it.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
24
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Exported Wix site
|
|
2
|
+
|
|
3
|
+
This workspace is an Origami export of a Wix site. A change is done only when it still imports back into the Wix Editor (`wix origami import-site`). Looking right under `yarn dev` is not enough.
|
|
4
|
+
|
|
5
|
+
Before any change to this site (JSX, CSS, Theme, pages, components, or build), read `node_modules/@wix/origami-skills/skills/wix-site-edit/SKILL.md` and follow it. If it is missing, run `yarn install` first. Do not edit the site from general React knowledge.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Exported Wix site
|
|
2
|
+
|
|
3
|
+
Your site lives in `src/`:
|
|
4
|
+
|
|
5
|
+
- `pages/` holds pages. `(home)` opens at `/`, nested folders such as `about-us/team` open at `/about-us/team`, and `error404` is the page shown when a URL is not found.
|
|
6
|
+
- `global/components/` holds shared components, `global/menus/` holds menus, and `global/themes/` holds the theme styles used across pages.
|
|
7
|
+
- Each page has `structure.jsx` for its content, `style.css` and `layout.css` for its appearance, `unmapped.json` for preserved Wix data, and `version` for importing changes back into Wix.
|
|
8
|
+
- Pages and global components each have a `_generated/` folder that connects their content, styles and services. `src/site/` connects authentication. `src/site/_generated/client.jsx` starts the site. These files are generated; edit the page or component source instead.
|
|
9
|
+
|
|
10
|
+
If the site has popups, they are in `popups/`. They are exported so that importing the site keeps them, but the site doesn't show them yet. Router pages (`[name]` folders, `route.json`) aren't supported yet.
|
|
11
|
+
|
|
12
|
+
## Run the site
|
|
13
|
+
|
|
14
|
+
Install dependencies with `yarn install`. <% if (!context.hasAdapter) { %>Once an adapter is configured, use<% } else { %>Use<% } %> `yarn dev` to preview changes, `yarn build` to prepare the production site, and `yarn start` to run it.<% if (!context.hasAdapter) { %> The adapter supplies these scripts; they are not included in this neutral export yet.<% } %>
|
|
15
|
+
|
|
16
|
+
## Environment variables
|
|
17
|
+
|
|
18
|
+
Set `VITE_WIX_CLIENT_ID` and `VITE_WIX_METASITE_ID` in `.env` at the project root to enable Wix visitor authentication. Both are needed. Without them the pages still render, but Wix API calls have no visitor authentication. Restart development or rebuild production after changing them. Do not put secrets in `VITE_` variables: they are exposed to the browser.
|
|
19
|
+
|
|
20
|
+
## Adapter setup
|
|
21
|
+
|
|
22
|
+
<!-- origami:adapter-readme -->
|
|
23
|
+
<% if (!context.hasAdapter) { -%>
|
|
24
|
+
Your adapter supplies its setup and commands here.
|
|
25
|
+
<% } -%>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { mountPage } from '@wix/origami-site/browser'
|
|
2
|
+
import { pages, popups, seoUriByPageId } from 'virtual:origami-site'
|
|
3
|
+
import { initializeAuth } from '../wixAuth.js'
|
|
4
|
+
|
|
5
|
+
mountPage(document.getElementById('root'), { pages, popups, seoUriByPageId, beforeMount: initializeAuth, siteId: import.meta.env.VITE_WIX_METASITE_ID })
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# This file marks the generated site as a standalone Yarn project.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Structure } from '<%= context.structureImport %>'
|
|
2
|
+
<% if (context.layout === 1) { %>import { servicesMap } from '@wix/origami-services'
|
|
3
|
+
import { WixServices } from '@wix/services-manager-react'
|
|
4
|
+
import { registeredServicesConfigs, sealServicesConfigs } from '@wix/origami-services/internal'
|
|
5
|
+
<% } %><% if (context.servicesConfigsPath) { %>import { registerServicesConfigs } from '@wix/origami-services'
|
|
6
|
+
import servicesConfigs from '../<%= context.servicesConfigsPath %>'
|
|
7
|
+
<% } %>import './<%= context.componentName %>.css'
|
|
8
|
+
<% if (context.servicesConfigsPath) { %>
|
|
9
|
+
registerServicesConfigs(servicesConfigs)
|
|
10
|
+
<% } %>
|
|
11
|
+
<% if (context.layout === 1) { %>const map = servicesMap({
|
|
12
|
+
servicesConfigs: registeredServicesConfigs(),
|
|
13
|
+
siteId: import.meta.env.VITE_WIX_METASITE_ID,
|
|
14
|
+
url: location.href,
|
|
15
|
+
userAgent: navigator.userAgent,
|
|
16
|
+
reducedMotion: globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').matches,
|
|
17
|
+
})
|
|
18
|
+
sealServicesConfigs()
|
|
19
|
+
|
|
20
|
+
<% } %>export default function <%= context.componentName %>() {
|
|
21
|
+
<% if (context.layout === 2) { %> return <Structure />
|
|
22
|
+
<% } else { %> return (
|
|
23
|
+
<WixServices servicesMap={map}>
|
|
24
|
+
<Structure />
|
|
25
|
+
</WixServices>
|
|
26
|
+
)
|
|
27
|
+
<% } %>}
|
|
28
|
+
<% if (context.servicesConfigsPath) { %>
|
|
29
|
+
if (import.meta.hot) {
|
|
30
|
+
import.meta.hot.accept('../<%= context.servicesConfigsPath %>', () => location.reload())
|
|
31
|
+
}
|
|
32
|
+
<% } %>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wix-site-edit
|
|
3
|
+
description: Applies Wix Editor-compatible practices for layout, style, animations, and components on an exported Wix site. Prefer native Wix solutions and Site Style/Brand; fall back to Custom/Global CSS, then the editor-react-component skill. Use for every change to the site: JSX structure, CSS, pages, components, interactions, or build.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Wix site edits
|
|
7
|
+
|
|
8
|
+
The instructions for this skill ship in the `@wix/origami-skills` package. Read `node_modules/@wix/origami-skills/skills/wix-site-edit/SKILL.md` and follow it. It sends you to its guides and to the other skills in `node_modules/@wix/origami-skills/skills/`.
|
|
9
|
+
|
|
10
|
+
If that file is missing, run `yarn install` from the workspace root first. Do not edit the site without it.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
24
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Exported Wix site
|
|
2
|
+
|
|
3
|
+
This workspace is an Origami export of a Wix site. A change is done only when it still imports back into the Wix Editor (`wix origami import-site`). Looking right under `yarn dev` is not enough.
|
|
4
|
+
|
|
5
|
+
Before any change to this site (JSX, CSS, Theme, pages, components, or build), read `node_modules/@wix/origami-skills/skills/wix-site-edit/SKILL.md` and follow it. If it is missing, run `yarn install` first. Do not edit the site from general React knowledge.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="<%= context.language %>">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title><!-- WIX_IMPORT_TITLE --></title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="root"></div>
|
|
10
|
+
<!-- WIX_IMPORT_ENTRY -->
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# This file marks the generated site as a standalone Yarn project.
|