create-shopnex 0.0.0-edge.e014713 → 0.0.0-edge.eb9547d
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 +1 -1
- package/dist/main.mjs +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ cd shopnex
|
|
|
35
35
|
npm start # or: npm run dev
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
No `npm install` first: both scripts run `npx --yes create-shopnex@<version> .`, the version that made the folder, and
|
|
38
|
+
No `npm install` first: both scripts run `npx --yes --loglevel=error create-shopnex@<version> .`, the version that made the folder, and
|
|
39
39
|
npx fetches it into its cache the first time. The same works from the folder above: `npx create-shopnex@latest shopnex`.
|
|
40
40
|
|
|
41
41
|
## What it does, and why you can trust it
|
package/dist/main.mjs
CHANGED
|
@@ -40,7 +40,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
40
40
|
var define_PKG_default;
|
|
41
41
|
var init_define_PKG = __esm({
|
|
42
42
|
"<define:__PKG__>"() {
|
|
43
|
-
define_PKG_default = { version: "0.0.0-edge.
|
|
43
|
+
define_PKG_default = { version: "0.0.0-edge.eb9547d", engines: { node: ">=22.22.0" } };
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
|
|
@@ -1123,7 +1123,7 @@ import { basename, join as join6 } from "node:path";
|
|
|
1123
1123
|
|
|
1124
1124
|
// src/readme.ts
|
|
1125
1125
|
init_define_PKG();
|
|
1126
|
-
var template2 = true ? "# Getting started with ShopNex\n\nRun a ShopNex shop on your machine in a few minutes. No PostgreSQL, no Docker, no clone.\n\nWhen it is running you have:\n\n- the **admin** at http://localhost:3000/admin\n- the **storefront** at http://localhost:4321\n- a **database** in the shop folder (embedded, for trying things out)\n\n## You need\n\n- Node.js 22.22 or newer\n- Free ports `3000` (admin, API, checkout) and `4321` (storefront). Other ports: `--port` and `--storefront-port`.\n\n## 1. Start the shop\n\n```sh\nnpx create-shopnex@latest my-shop\n```\n\nThis creates the folder `my-shop`, downloads ShopNex once (about 15 MB, kept in `~/.shopnex/app` and shared by all\nyour shops), starts the admin and the storefront, and opens the admin in your browser. The first start takes a minute.\nLeave the terminal open: Ctrl+C stops the shop.\n\n## 2. Create the owner account\n\nThe admin opens the setup wizard on the first run. Create the owner account right away: until you do, whoever reaches\nthe admin can. Both servers listen on your machine only (`127.0.0.1`).\n\nThen open the storefront at http://localhost:4321 and the admin at http://localhost:3000/admin.\n\n## 3. Run it again\n\n```sh\ncd my-shop\nnpm start\n```\n\n`npm run dev` does the same. Nothing to install first: the script runs `npx --yes create-shopnex@<version> .` with the\nversion that made the folder. The shop's data stays in the folder, so the same folder is the same shop.\n\n## 4. Add your first product\n\nIn the admin, add a product (a name and a price are enough), then reload the storefront: it shows up there. That is the\nwhole loop: you change things in the admin, customers see them in the storefront.\n\nTo try a card payment, start the Stripe app next to the shop (`--with stripe`, see below), install it from the admin and\nenter your Stripe **test** keys; the test card is `4242 4242 4242 4242`. Stripe cannot reach a `localhost` address, so\npayments need a public address for the app or `stripe listen`: the Stripe app's settings page explains it.\n\n## Update\n\n`npm start` runs the version written in the shop's `package.json` (`create-shopnex@<version>`), so it never changes by\nitself. To move to a newer version:\n\n1. Stop the shop and copy the folder somewhere as a backup.\n2. Change the version in the two scripts of `package.json` (or run `npx create-shopnex@latest my-shop` once).\n3. Start it again. The database changes the new version needs are applied on start.\n\n## What is in the folder\n\n| File | What it is |\n| -------------------- | ---------------------------------------------------------------------------------------------------------------- |\n| `.env` | The shop's settings and secrets. Keep it out of git; a lost `SHOPNEX_SECRET` means a new shop |\n| `.pglite/` | The embedded trial database |\n| `docker-compose.yml` | For running the shop in Docker instead: see the [self-hosting docs](https://shopnex.ai/docs/self-hosting/docker) |\n| `README.md` | How to run this shop again |\n\n## Next\n\n- **Payments and shipping:** start the optional apps next to the shop with\n `npx create-shopnex@latest my-shop --with stripe,cj,shippo`, then install them from the admin and enter your keys.\n- **From trying it to a real shop:** the embedded database is for trying ShopNex out (one process owns it), so move to\n PostgreSQL before you rely on the shop. With the shop stopped, run this in its folder with an empty PostgreSQL database:\n\n ```sh\n TARGET=postgres://user:password@host:5432/shopnex npx shopnex migrate-db --to-env TARGET\n ```\n\n It copies the data, keeps a copy of the old data next to it and points the `.env` at PostgreSQL. Then run the shop in\n Docker with the `docker-compose.yml` ([self-hosting docs](https://shopnex.ai/docs/self-hosting/docker)).\n\n- **Every option and how the download is checked:** the [package README](https://github.com/shopnex-ai/shopnex/tree/main/packages/create-shopnex#readme).\n\n## If something goes wrong\n\n- **A port is taken:** the command stops before downloading anything and names the flag to change (`--port`,\n `--storefront-port`).\n- **No connection:** the first run needs the network for the download; later runs do not.\n- **Servers will not start:** run again with `--verbose` to see their output.\n- **Start over:** delete the shop folder.\n" : readFileSync(new URL("../getting-started/README.md", import.meta.url), "utf8");
|
|
1126
|
+
var template2 = true ? "# Getting started with ShopNex\n\nRun a ShopNex shop on your machine in a few minutes. No PostgreSQL, no Docker, no clone.\n\nWhen it is running you have:\n\n- the **admin** at http://localhost:3000/admin\n- the **storefront** at http://localhost:4321\n- a **database** in the shop folder (embedded, for trying things out)\n\n## You need\n\n- Node.js 22.22 or newer\n- Free ports `3000` (admin, API, checkout) and `4321` (storefront). Other ports: `--port` and `--storefront-port`.\n\n## 1. Start the shop\n\n```sh\nnpx create-shopnex@latest my-shop\n```\n\nThis creates the folder `my-shop`, downloads ShopNex once (about 15 MB, kept in `~/.shopnex/app` and shared by all\nyour shops), starts the admin and the storefront, and opens the admin in your browser. The first start takes a minute.\nLeave the terminal open: Ctrl+C stops the shop.\n\n## 2. Create the owner account\n\nThe admin opens the setup wizard on the first run. Create the owner account right away: until you do, whoever reaches\nthe admin can. Both servers listen on your machine only (`127.0.0.1`).\n\nThen open the storefront at http://localhost:4321 and the admin at http://localhost:3000/admin.\n\n## 3. Run it again\n\n```sh\ncd my-shop\nnpm start\n```\n\n`npm run dev` does the same. Nothing to install first: the script runs `npx --yes --loglevel=error create-shopnex@<version> .` with the\nversion that made the folder. The shop's data stays in the folder, so the same folder is the same shop.\n\n## 4. Add your first product\n\nIn the admin, add a product (a name and a price are enough), then reload the storefront: it shows up there. That is the\nwhole loop: you change things in the admin, customers see them in the storefront.\n\nTo try a card payment, start the Stripe app next to the shop (`--with stripe`, see below), install it from the admin and\nenter your Stripe **test** keys; the test card is `4242 4242 4242 4242`. Stripe cannot reach a `localhost` address, so\npayments need a public address for the app or `stripe listen`: the Stripe app's settings page explains it.\n\n## Update\n\n`npm start` runs the version written in the shop's `package.json` (`create-shopnex@<version>`), so it never changes by\nitself. To move to a newer version:\n\n1. Stop the shop and copy the folder somewhere as a backup.\n2. Change the version in the two scripts of `package.json` (or run `npx create-shopnex@latest my-shop` once).\n3. Start it again. The database changes the new version needs are applied on start.\n\n## What is in the folder\n\n| File | What it is |\n| -------------------- | ---------------------------------------------------------------------------------------------------------------- |\n| `.env` | The shop's settings and secrets. Keep it out of git; a lost `SHOPNEX_SECRET` means a new shop |\n| `.pglite/` | The embedded trial database |\n| `docker-compose.yml` | For running the shop in Docker instead: see the [self-hosting docs](https://shopnex.ai/docs/self-hosting/docker) |\n| `README.md` | How to run this shop again |\n\n## Next\n\n- **Payments and shipping:** start the optional apps next to the shop with\n `npx create-shopnex@latest my-shop --with stripe,cj,shippo`, then install them from the admin and enter your keys.\n- **From trying it to a real shop:** the embedded database is for trying ShopNex out (one process owns it), so move to\n PostgreSQL before you rely on the shop. With the shop stopped, run this in its folder with an empty PostgreSQL database:\n\n ```sh\n TARGET=postgres://user:password@host:5432/shopnex npx shopnex migrate-db --to-env TARGET\n ```\n\n It copies the data, keeps a copy of the old data next to it and points the `.env` at PostgreSQL. Then run the shop in\n Docker with the `docker-compose.yml` ([self-hosting docs](https://shopnex.ai/docs/self-hosting/docker)).\n\n- **Every option and how the download is checked:** the [package README](https://github.com/shopnex-ai/shopnex/tree/main/packages/create-shopnex#readme).\n\n## If something goes wrong\n\n- **A port is taken:** the command stops before downloading anything and names the flag to change (`--port`,\n `--storefront-port`).\n- **No connection:** the first run needs the network for the download; later runs do not.\n- **Servers will not start:** run again with `--verbose` to see their output.\n- **Start over:** delete the shop folder.\n" : readFileSync(new URL("../getting-started/README.md", import.meta.url), "utf8");
|
|
1127
1127
|
var EXAMPLE_NAME = "my-shop";
|
|
1128
1128
|
var readme = (name) => template2.replaceAll(EXAMPLE_NAME, name);
|
|
1129
1129
|
|
|
@@ -1135,7 +1135,7 @@ apps/*/.pglite/
|
|
|
1135
1135
|
apps/*/app-key
|
|
1136
1136
|
`;
|
|
1137
1137
|
var packageJson = (name, version) => {
|
|
1138
|
-
const run2 = `npx --yes create-shopnex@${version} .`;
|
|
1138
|
+
const run2 = `npx --yes --loglevel=error create-shopnex@${version} .`;
|
|
1139
1139
|
return JSON.stringify(
|
|
1140
1140
|
{
|
|
1141
1141
|
name: name.toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^[._-]+/, "") || "shopnex-shop",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-shopnex",
|
|
3
|
-
"version": "0.0.0-edge.
|
|
3
|
+
"version": "0.0.0-edge.eb9547d",
|
|
4
4
|
"description": "Try ShopNex with one command: npx create-shopnex starts the admin and the storefront on an embedded database, nothing else to install",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://shopnex.ai",
|