rosefc 0.0.0-stage → 0.2.0
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/LICENSE +21 -0
- package/deploy/Dockerfile.node +25 -0
- package/deploy/Dockerfile.static +34 -0
- package/deploy/api/rosefd.ts +19 -0
- package/deploy/cloudflare/functions/[[path]].ts +59 -0
- package/deploy/cloudflare/wrangler.toml +14 -0
- package/deploy/docker-compose.yml +45 -0
- package/deploy/fly.toml +28 -0
- package/deploy/k8s/rosefd.yaml +128 -0
- package/deploy/native/RosefdApp.xcscheme +87 -0
- package/deploy/native/android.yml +62 -0
- package/deploy/native/flutter.yml +96 -0
- package/deploy/native/ios.yml +67 -0
- package/deploy/netlify/functions/rosefd.ts +36 -0
- package/deploy/netlify.toml +17 -0
- package/deploy/server.cjs +4 -0
- package/deploy/vercel.json +13 -0
- package/dist-cli/compiler.mjs +1693 -0
- package/dist-cli/edge.mjs +199 -0
- package/dist-cli/export.mjs +12287 -0
- package/dist-cli/rosefd.mjs +12783 -0
- package/dist-cli/runtime.mjs +6 -0
- package/dist-cli/test.mjs +1885 -0
- package/package.json +110 -4
- package/src/FRAMEWORK_VERSION +1 -0
- package/src/cli/content.ts +188 -0
- package/src/cli/edge.ts +298 -0
- package/src/cli/hot-vary.ts +27 -0
- package/src/cli/origin.ts +10 -0
- package/src/cli/prod-server.ts +817 -0
- package/src/cli/shell.ts +610 -0
- package/src/cli/shutdown.ts +56 -0
- package/src/cli/validator.ts +53 -0
- package/src/hash.ts +9 -0
- package/src/runtime/db.ts +166 -0
- package/src/runtime/index.ts +2992 -0
- package/src/runtime/lorawan.ts +149 -0
- package/src/types/rosefd.d.ts +327 -0
- package/README.md +0 -3
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Rosefd - iOS build (GitHub Actions): an UNSIGNED archive.
|
|
2
|
+
#
|
|
3
|
+
# `rosefd export xcode` copies this file into the export tree as
|
|
4
|
+
# .github/workflows/ios.yml, at the root of the exported Xcode project, so
|
|
5
|
+
# every path below is the project's own. The shared scheme this archives is
|
|
6
|
+
# emitted beside project.pbxproj by the same export.
|
|
7
|
+
#
|
|
8
|
+
# No credential is written into this file. A signed archive reads its
|
|
9
|
+
# certificate from `${{ secrets.NAME }}` - see DEPLOY.md.
|
|
10
|
+
|
|
11
|
+
name: iOS
|
|
12
|
+
|
|
13
|
+
on:
|
|
14
|
+
push:
|
|
15
|
+
branches: [main]
|
|
16
|
+
pull_request:
|
|
17
|
+
workflow_dispatch:
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
archive:
|
|
21
|
+
runs-on: macos-14
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
- name: List the project
|
|
27
|
+
run: xcodebuild -list -project RosefdApp.xcodeproj
|
|
28
|
+
|
|
29
|
+
# No certificate, no provisioning profile, no team: signing is switched
|
|
30
|
+
# off and the archive lands unsigned in build/. Installing or shipping
|
|
31
|
+
# it is the manual step - see DEPLOY.md.
|
|
32
|
+
- name: xcodebuild archive (unsigned)
|
|
33
|
+
run: |
|
|
34
|
+
xcodebuild archive \
|
|
35
|
+
-project RosefdApp.xcodeproj \
|
|
36
|
+
-scheme RosefdApp \
|
|
37
|
+
-configuration Release \
|
|
38
|
+
-destination 'generic/platform=iOS' \
|
|
39
|
+
-archivePath build/RosefdApp.xcarchive \
|
|
40
|
+
CODE_SIGNING_ALLOWED=NO \
|
|
41
|
+
CODE_SIGNING_REQUIRED=NO \
|
|
42
|
+
CODE_SIGN_IDENTITY=""
|
|
43
|
+
|
|
44
|
+
- uses: actions/upload-artifact@v4
|
|
45
|
+
with:
|
|
46
|
+
name: rosefd-ios-xcarchive
|
|
47
|
+
path: build/RosefdApp.xcarchive
|
|
48
|
+
if-no-files-found: error
|
|
49
|
+
|
|
50
|
+
# Signed archive: add the certificate as repository secrets, import it into a
|
|
51
|
+
# temporary keychain before the archive, and replace CODE_SIGNING_ALLOWED=NO
|
|
52
|
+
# with `-allowProvisioningUpdates`.
|
|
53
|
+
#
|
|
54
|
+
# env:
|
|
55
|
+
# IOS_CERT_P12_BASE64: ${{ secrets.IOS_CERT_P12_BASE64 }}
|
|
56
|
+
# IOS_CERT_PASSWORD: ${{ secrets.IOS_CERT_PASSWORD }}
|
|
57
|
+
# IOS_KEYCHAIN_PASSWORD: ${{ secrets.IOS_KEYCHAIN_PASSWORD }}
|
|
58
|
+
#
|
|
59
|
+
# steps:
|
|
60
|
+
# - name: Import the signing certificate
|
|
61
|
+
# run: |
|
|
62
|
+
# echo "$IOS_CERT_P12_BASE64" | base64 -d > cert.p12
|
|
63
|
+
# security create-keychain -p "$IOS_KEYCHAIN_PASSWORD" build.keychain
|
|
64
|
+
# security default-keychain -s build.keychain
|
|
65
|
+
# security unlock-keychain -p "$IOS_KEYCHAIN_PASSWORD" build.keychain
|
|
66
|
+
# security import cert.p12 -k build.keychain -P "$IOS_CERT_PASSWORD" -T /usr/bin/codesign
|
|
67
|
+
# security set-key-partition-list -S apple-tool:,apple: -s -k "$IOS_KEYCHAIN_PASSWORD" build.keychain
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The rosefd Netlify function - the dynamic half of a Netlify deploy.
|
|
3
|
+
*
|
|
4
|
+
* Every request that is NOT a static file in dist/ lands here: dynamic
|
|
5
|
+
* pages (/sign, anything reading getContext() or $store()), /api routes,
|
|
6
|
+
* and POST server actions. Static answers - prerendered documents, the
|
|
7
|
+
* bundles, baked API bodies - are served by the CDN straight from dist/
|
|
8
|
+
* (the `publish` directory) and never touch this code. That split is the
|
|
9
|
+
* whole rosefd story: the static half costs zero function invocations.
|
|
10
|
+
*
|
|
11
|
+
* It reuses the framework's own edge adapter (the same Web-standard fetch
|
|
12
|
+
* handler the edge adapter test exercises) over the built server bundle,
|
|
13
|
+
* on Netlify's Functions v2 Web-standard signature - `export default`
|
|
14
|
+
* taking a Request and returning a Response. Netlify compiles TypeScript
|
|
15
|
+
* entrypoints and their imports, so this file and the adapter it pulls in
|
|
16
|
+
* stay .ts. The Lambda runtime has a filesystem, so `included_files`
|
|
17
|
+
* (`dist/**` in netlify.toml) carries dist/ into the bundle and the
|
|
18
|
+
* adapter reads server.js / client.js from it at boot.
|
|
19
|
+
*
|
|
20
|
+
* Install: copy this file to <project>/netlify/functions/rosefd.ts and
|
|
21
|
+
* deploy/netlify.toml to <project>/netlify.toml, then push (or
|
|
22
|
+
* `netlify deploy --prod`). In a project that depends on the published
|
|
23
|
+
* package the import below becomes:
|
|
24
|
+
* import { createEdgeHandler } from 'rosefd/edge';
|
|
25
|
+
*/
|
|
26
|
+
import { createEdgeHandler } from '../../src/cli/edge.ts';
|
|
27
|
+
import { fileURLToPath } from 'node:url';
|
|
28
|
+
|
|
29
|
+
let handle: ((request: Request) => Promise<Response>) | null = null;
|
|
30
|
+
|
|
31
|
+
export default async function rosefd(request: Request): Promise<Response> {
|
|
32
|
+
if (!handle) {
|
|
33
|
+
handle = await createEdgeHandler(fileURLToPath(new URL('../../dist', import.meta.url)));
|
|
34
|
+
}
|
|
35
|
+
return handle(request);
|
|
36
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[build]
|
|
2
|
+
command = "npm run build"
|
|
3
|
+
publish = "dist"
|
|
4
|
+
|
|
5
|
+
[functions]
|
|
6
|
+
directory = "netlify/functions"
|
|
7
|
+
included_files = ["dist/**"]
|
|
8
|
+
|
|
9
|
+
# Netlify answers the publish directory first, so a prerendered document, a
|
|
10
|
+
# bundle or a baked API body is served by the CDN and never invokes the
|
|
11
|
+
# function. Everything else - dynamic routes, live /api routes, POST server
|
|
12
|
+
# actions - falls through to the catch-all below (status 200 = rewrite, not
|
|
13
|
+
# redirect; the browser keeps its URL).
|
|
14
|
+
[[redirects]]
|
|
15
|
+
from = "/*"
|
|
16
|
+
to = "/.netlify/functions/rosefd"
|
|
17
|
+
status = 200
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://openapi.vercel.sh/vercel.json",
|
|
3
|
+
"buildCommand": "npm run build",
|
|
4
|
+
"outputDirectory": "dist",
|
|
5
|
+
"functions": {
|
|
6
|
+
"api/rosefd.ts": {
|
|
7
|
+
"includeFiles": "dist/**"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"rewrites": [
|
|
11
|
+
{ "source": "/(.*)", "destination": "/api/rosefd" }
|
|
12
|
+
]
|
|
13
|
+
}
|