rosefc 0.2.0 → 0.2.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 rosefd
3
+ Copyright (c) 2026 rosefc
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,5 +1,5 @@
1
1
  # The Node service: the dynamic half as a container. Builds the app, then
2
- # runs `rosefd serve` - the cluster runner (one worker per core, bounded
2
+ # runs `rosefc serve` - the cluster runner (one worker per core, bounded
3
3
  # request bodies, request/header/keep-alive timeouts, graceful SIGTERM
4
4
  # drain, one access line per request on stdout). Pair it with
5
5
  # Dockerfile.static (the Go binary in front) using docker-compose.yml.
@@ -18,7 +18,7 @@ COPY --from=build /app/dist ./dist
18
18
  COPY --from=build /app/src ./src
19
19
  COPY --from=build /app/package.json ./
20
20
  EXPOSE 3000
21
- # ROSEFD_WORKERS defaults to the container's CPU count.
21
+ # ROSEFC_WORKERS defaults to the container's CPU count.
22
22
  # The demo api's SQLite file lands in the working directory: mount a volume
23
23
  # at /app to keep it across deploys (a real deployment points the api at
24
24
  # Postgres instead - the connection block is the only thing that changes).
@@ -3,8 +3,8 @@
3
3
  # Build the site with Node, embed it into ONE Go binary, ship an image with
4
4
  # no runtime to install and nothing to configure:
5
5
  #
6
- # docker build -f deploy/Dockerfile.static -t rosefd-static .
7
- # docker run -p 8080:8080 -e UPSTREAM=http://dynamic:3000 rosefd-static
6
+ # docker build -f deploy/Dockerfile.static -t rosefc-static .
7
+ # docker run -p 8080:8080 -e UPSTREAM=http://dynamic:3000 rosefc-static
8
8
  #
9
9
  # UPSTREAM is optional. Without it the binary is the pure-static deploy (it
10
10
  # answers 405 for POSTs and a JSON 404 for unbaked /api routes - the
@@ -23,12 +23,12 @@ FROM golang:alpine AS bin
23
23
  WORKDIR /app
24
24
  COPY main.go go.mod ./
25
25
  COPY --from=site /app/dist ./dist
26
- RUN go build -trimpath -o rosefd-server .
26
+ RUN go build -trimpath -o rosefc-server .
27
27
 
28
28
  FROM alpine:3.20
29
- COPY --from=bin /app/rosefd-server /usr/local/bin/rosefd-server
29
+ COPY --from=bin /app/rosefc-server /usr/local/bin/rosefc-server
30
30
  ENV PORT=8080
31
31
  EXPOSE 8080
32
32
  # The access log goes to stdout and errors to stderr, so `docker logs`
33
33
  # and any collector see them without mounting a file.
34
- ENTRYPOINT ["rosefd-server"]
34
+ ENTRYPOINT ["rosefc-server"]
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The rosefd Cloudflare Pages function - the dynamic half of a Pages
2
+ * The rosefc Cloudflare Pages function - the dynamic half of a Pages
3
3
  * deploy.
4
4
  *
5
5
  * Pages answers static assets (everything in dist/: prerendered
@@ -33,7 +33,7 @@
33
33
  * `npx wrangler pages deploy` (or push, with the Pages git integration).
34
34
  * In a project that depends on the published package the import below
35
35
  * becomes:
36
- * import { createEdgeHandler } from 'rosefd/edge';
36
+ * import { createEdgeHandler } from 'rosefc/edge';
37
37
  */
38
38
  import { createEdgeHandler } from '../src/cli/edge.ts';
39
39
  import * as server from '../dist/server.js';
@@ -1,6 +1,6 @@
1
- # Cloudflare Pages - rosefd. `pages_build_output_dir` makes this file the
1
+ # Cloudflare Pages - rosefc. `pages_build_output_dir` makes this file the
2
2
  # source of truth for the project, so it lives in the repo next to the app.
3
- name = "rosefd"
3
+ name = "rosefc"
4
4
  pages_build_output_dir = "./dist"
5
5
 
6
6
  # The build writes dist/ exactly like every other target; Pages then serves
package/deploy/fly.toml CHANGED
@@ -1,14 +1,14 @@
1
- # Fly.io: the rosefd Node service as a machine.
1
+ # Fly.io: the rosefc Node service as a machine.
2
2
  #
3
3
  # cp deploy/fly.toml ./fly.toml
4
4
  # fly launch --no-deploy
5
5
  # fly deploy
6
6
  #
7
7
  # The app builds deploy/Dockerfile.node (Node builds the site, then runs
8
- # `rosefd serve` - the cluster runner). Swap the dockerfile line for
8
+ # `rosefc serve` - the cluster runner). Swap the dockerfile line for
9
9
  # "deploy/Dockerfile.static" to ship the Go single binary instead, and set
10
10
  # UPSTREAM to the Node app for the dynamic half.
11
- app = "rosefd"
11
+ app = "rosefc"
12
12
  primary_region = "iad"
13
13
 
14
14
  [build]
@@ -17,7 +17,7 @@ primary_region = "iad"
17
17
  [http_service]
18
18
  internal_port = 3000
19
19
  force_https = true
20
- # rosefd serve already clusters across every core of the machine; give it
20
+ # rosefc serve already clusters across every core of the machine; give it
21
21
  # the cores instead of paying for more, smaller machines.
22
22
  auto_stop_machines = "suspend"
23
23
  auto_start_machines = true
@@ -14,25 +14,25 @@
14
14
  # UPSTREAM env and the static Deployment becomes the pure-static deploy:
15
15
  # POSTs answer 405, unbaked APIs answer the JSON 404.
16
16
  #
17
- # kubectl apply -f deploy/k8s/rosefd.yaml
17
+ # kubectl apply -f deploy/k8s/rosefc.yaml
18
18
  #
19
19
  # Build the two images first (from the repo root):
20
- # docker build -f deploy/Dockerfile.static -t rosefd-static .
21
- # docker build -f deploy/Dockerfile.node -t rosefd .
20
+ # docker build -f deploy/Dockerfile.static -t rosefc-static .
21
+ # docker build -f deploy/Dockerfile.node -t rosefc .
22
22
  # ...then push them to your registry and replace the image names below.
23
23
  # The Ingress is optional: delete it and port-forward the static Service.
24
24
  apiVersion: apps/v1
25
25
  kind: Deployment
26
26
  metadata:
27
- name: rosefd-static
28
- labels: { app: rosefd, tier: static }
27
+ name: rosefc-static
28
+ labels: { app: rosefc, tier: static }
29
29
  spec:
30
30
  replicas: 2
31
31
  selector:
32
- matchLabels: { app: rosefd, tier: static }
32
+ matchLabels: { app: rosefc, tier: static }
33
33
  template:
34
34
  metadata:
35
- labels: { app: rosefd, tier: static }
35
+ labels: { app: rosefc, tier: static }
36
36
  annotations:
37
37
  prometheus.io/scrape: "true"
38
38
  prometheus.io/path: /metrics
@@ -40,12 +40,12 @@ spec:
40
40
  spec:
41
41
  containers:
42
42
  - name: static
43
- image: rosefd-static:latest
43
+ image: rosefc-static:latest
44
44
  env:
45
45
  - name: PORT
46
46
  value: "8080"
47
47
  - name: UPSTREAM
48
- value: http://rosefd-dynamic:3000
48
+ value: http://rosefc-dynamic:3000
49
49
  ports:
50
50
  - name: http
51
51
  containerPort: 8080
@@ -58,9 +58,9 @@ spec:
58
58
  apiVersion: v1
59
59
  kind: Service
60
60
  metadata:
61
- name: rosefd-static
61
+ name: rosefc-static
62
62
  spec:
63
- selector: { app: rosefd, tier: static }
63
+ selector: { app: rosefc, tier: static }
64
64
  ports:
65
65
  - name: http
66
66
  port: 80
@@ -69,22 +69,22 @@ spec:
69
69
  apiVersion: apps/v1
70
70
  kind: Deployment
71
71
  metadata:
72
- name: rosefd-dynamic
73
- labels: { app: rosefd, tier: dynamic }
72
+ name: rosefc-dynamic
73
+ labels: { app: rosefc, tier: dynamic }
74
74
  spec:
75
75
  replicas: 2
76
76
  selector:
77
- matchLabels: { app: rosefd, tier: dynamic }
77
+ matchLabels: { app: rosefc, tier: dynamic }
78
78
  template:
79
79
  metadata:
80
- labels: { app: rosefd, tier: dynamic }
80
+ labels: { app: rosefc, tier: dynamic }
81
81
  spec:
82
82
  containers:
83
83
  - name: dynamic
84
- image: rosefd:latest
85
- # `rosefd serve` is the production runner: the stdlib cluster (one
84
+ image: rosefc:latest
85
+ # `rosefc serve` is the production runner: the stdlib cluster (one
86
86
  # worker per core), bounded bodies, timeouts, graceful drain.
87
- command: ["rosefd", "serve"]
87
+ command: ["rosefc", "serve"]
88
88
  env:
89
89
  - name: PORT
90
90
  value: "3000"
@@ -100,12 +100,12 @@ spec:
100
100
  apiVersion: v1
101
101
  kind: Service
102
102
  metadata:
103
- name: rosefd-dynamic
103
+ name: rosefc-dynamic
104
104
  spec:
105
105
  # ClusterIP on purpose: the dynamic half is reached through the static
106
106
  # half's UPSTREAM proxy, never directly.
107
107
  type: ClusterIP
108
- selector: { app: rosefd, tier: dynamic }
108
+ selector: { app: rosefc, tier: dynamic }
109
109
  ports:
110
110
  - name: http
111
111
  port: 3000
@@ -114,7 +114,7 @@ spec:
114
114
  apiVersion: networking.k8s.io/v1
115
115
  kind: Ingress
116
116
  metadata:
117
- name: rosefd
117
+ name: rosefc
118
118
  spec:
119
119
  rules:
120
120
  - http:
@@ -123,6 +123,6 @@ spec:
123
123
  pathType: Prefix
124
124
  backend:
125
125
  service:
126
- name: rosefd-static
126
+ name: rosefc-static
127
127
  port:
128
128
  number: 80
@@ -1,10 +1,10 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <!--
3
- Rosefd - the shared scheme for the generated Xcode project.
3
+ Rosefc - the shared scheme for the generated Xcode project.
4
4
 
5
- `rosefd export xcode` copies this to
6
- RosefdApp.xcodeproj/xcshareddata/xcschemes/RosefdApp.xcscheme and substitutes
7
- __ROSEFD_TARGET_ID__ with the pbxproj's own target id. `xcodebuild archive`
5
+ `rosefc export xcode` copies this to
6
+ RosefcApp.xcodeproj/xcshareddata/xcschemes/RosefcApp.xcscheme and substitutes
7
+ __ROSEFC_TARGET_ID__ with the pbxproj's own target id. `xcodebuild archive`
8
8
  requires a scheme, and Xcode only auto-creates one when the project is opened
9
9
  in the IDE - which a CI runner never does.
10
10
  -->
@@ -23,10 +23,10 @@
23
23
  buildForAnalyzing = "YES">
24
24
  <BuildableReference
25
25
  BuildableIdentifier = "primary"
26
- BlueprintIdentifier = "__ROSEFD_TARGET_ID__"
27
- BuildableName = "RosefdApp.app"
28
- BlueprintName = "RosefdApp"
29
- ReferencedContainer = "container:RosefdApp.xcodeproj">
26
+ BlueprintIdentifier = "__ROSEFC_TARGET_ID__"
27
+ BuildableName = "RosefcApp.app"
28
+ BlueprintName = "RosefcApp"
29
+ ReferencedContainer = "container:RosefcApp.xcodeproj">
30
30
  </BuildableReference>
31
31
  </BuildActionEntry>
32
32
  </BuildActionEntries>
@@ -53,10 +53,10 @@
53
53
  runnableDebuggingMode = "0">
54
54
  <BuildableReference
55
55
  BuildableIdentifier = "primary"
56
- BlueprintIdentifier = "__ROSEFD_TARGET_ID__"
57
- BuildableName = "RosefdApp.app"
58
- BlueprintName = "RosefdApp"
59
- ReferencedContainer = "container:RosefdApp.xcodeproj">
56
+ BlueprintIdentifier = "__ROSEFC_TARGET_ID__"
57
+ BuildableName = "RosefcApp.app"
58
+ BlueprintName = "RosefcApp"
59
+ ReferencedContainer = "container:RosefcApp.xcodeproj">
60
60
  </BuildableReference>
61
61
  </BuildableProductRunnable>
62
62
  </LaunchAction>
@@ -70,10 +70,10 @@
70
70
  runnableDebuggingMode = "0">
71
71
  <BuildableReference
72
72
  BuildableIdentifier = "primary"
73
- BlueprintIdentifier = "__ROSEFD_TARGET_ID__"
74
- BuildableName = "RosefdApp.app"
75
- BlueprintName = "RosefdApp"
76
- ReferencedContainer = "container:RosefdApp.xcodeproj">
73
+ BlueprintIdentifier = "__ROSEFC_TARGET_ID__"
74
+ BuildableName = "RosefcApp.app"
75
+ BlueprintName = "RosefcApp"
76
+ ReferencedContainer = "container:RosefcApp.xcodeproj">
77
77
  </BuildableReference>
78
78
  </BuildableProductRunnable>
79
79
  </ProfileAction>
@@ -1,6 +1,6 @@
1
- # Rosefd - Android release build (GitHub Actions).
1
+ # Rosefc - Android release build (GitHub Actions).
2
2
  #
3
- # `rosefd export android` copies this file into the export tree as
3
+ # `rosefc export android` copies this file into the export tree as
4
4
  # .github/workflows/android.yml, at the root of the exported Gradle project,
5
5
  # so every path below is the project's own.
6
6
  #
@@ -40,7 +40,7 @@ jobs:
40
40
 
41
41
  - uses: actions/upload-artifact@v4
42
42
  with:
43
- name: rosefd-android-release
43
+ name: rosefc-android-release
44
44
  path: app/build/outputs/apk/release/*.apk
45
45
  if-no-files-found: error
46
46
 
@@ -1,6 +1,6 @@
1
- # Rosefd - Flutter build (GitHub Actions): APK + unsigned iOS app.
1
+ # Rosefc - Flutter build (GitHub Actions): APK + unsigned iOS app.
2
2
  #
3
- # `rosefd export flutter` copies this file into the export tree as
3
+ # `rosefc export flutter` copies this file into the export tree as
4
4
  # .github/workflows/flutter.yml, at the root of the exported Flutter project,
5
5
  # so every path below is the project's own.
6
6
  #
@@ -40,7 +40,7 @@ jobs:
40
40
  # clobber it, so it is deliberately absent. --org matters: with no
41
41
  # ios/Runner or android/app on disk, `flutter create` cannot infer one.
42
42
  - name: Scaffold the platform folders
43
- run: flutter create --platforms=android,ios --org dev.rosefd --project-name rosefd_app .
43
+ run: flutter create --platforms=android,ios --org dev.rosefc --project-name rosefc_app .
44
44
 
45
45
  # Flutter falls back to the debug key until a release keystore is
46
46
  # configured, so this APK builds and installs without one - signing it is
@@ -50,7 +50,7 @@ jobs:
50
50
 
51
51
  - uses: actions/upload-artifact@v4
52
52
  with:
53
- name: rosefd-flutter-apk
53
+ name: rosefc-flutter-apk
54
54
  path: build/app/outputs/flutter-apk/app-release.apk
55
55
  if-no-files-found: error
56
56
 
@@ -68,7 +68,7 @@ jobs:
68
68
  - run: flutter pub get
69
69
 
70
70
  - name: Scaffold the platform folders
71
- run: flutter create --platforms=android,ios --project-name rosefd_app .
71
+ run: flutter create --platforms=android,ios --project-name rosefc_app .
72
72
 
73
73
  # `flutter build ipa` needs a signed Xcode project, and the export ships
74
74
  # no signing setup. Until a certificate exists, build the device app
@@ -81,12 +81,12 @@ jobs:
81
81
  run: |
82
82
  mkdir -p build/ipa/Payload
83
83
  cp -R build/ios/iphoneos/Runner.app build/ipa/Payload/
84
- cd build/ipa && zip -qry RosefdApp-unsigned.ipa Payload
84
+ cd build/ipa && zip -qry RosefcApp-unsigned.ipa Payload
85
85
 
86
86
  - uses: actions/upload-artifact@v4
87
87
  with:
88
- name: rosefd-flutter-ipa
89
- path: build/ipa/RosefdApp-unsigned.ipa
88
+ name: rosefc-flutter-ipa
89
+ path: build/ipa/RosefcApp-unsigned.ipa
90
90
  if-no-files-found: error
91
91
 
92
92
  # Signed builds: add the secrets named in DEPLOY.md, then
@@ -1,6 +1,6 @@
1
- # Rosefd - iOS build (GitHub Actions): an UNSIGNED archive.
1
+ # Rosefc - iOS build (GitHub Actions): an UNSIGNED archive.
2
2
  #
3
- # `rosefd export xcode` copies this file into the export tree as
3
+ # `rosefc export xcode` copies this file into the export tree as
4
4
  # .github/workflows/ios.yml, at the root of the exported Xcode project, so
5
5
  # every path below is the project's own. The shared scheme this archives is
6
6
  # emitted beside project.pbxproj by the same export.
@@ -24,7 +24,7 @@ jobs:
24
24
  - uses: actions/checkout@v4
25
25
 
26
26
  - name: List the project
27
- run: xcodebuild -list -project RosefdApp.xcodeproj
27
+ run: xcodebuild -list -project RosefcApp.xcodeproj
28
28
 
29
29
  # No certificate, no provisioning profile, no team: signing is switched
30
30
  # off and the archive lands unsigned in build/. Installing or shipping
@@ -32,19 +32,19 @@ jobs:
32
32
  - name: xcodebuild archive (unsigned)
33
33
  run: |
34
34
  xcodebuild archive \
35
- -project RosefdApp.xcodeproj \
36
- -scheme RosefdApp \
35
+ -project RosefcApp.xcodeproj \
36
+ -scheme RosefcApp \
37
37
  -configuration Release \
38
38
  -destination 'generic/platform=iOS' \
39
- -archivePath build/RosefdApp.xcarchive \
39
+ -archivePath build/RosefcApp.xcarchive \
40
40
  CODE_SIGNING_ALLOWED=NO \
41
41
  CODE_SIGNING_REQUIRED=NO \
42
42
  CODE_SIGN_IDENTITY=""
43
43
 
44
44
  - uses: actions/upload-artifact@v4
45
45
  with:
46
- name: rosefd-ios-xcarchive
47
- path: build/RosefdApp.xcarchive
46
+ name: rosefc-ios-xcarchive
47
+ path: build/RosefcApp.xcarchive
48
48
  if-no-files-found: error
49
49
 
50
50
  # Signed archive: add the certificate as repository secrets, import it into a
@@ -1,12 +1,12 @@
1
1
  /**
2
- * The rosefd Netlify function - the dynamic half of a Netlify deploy.
2
+ * The rosefc Netlify function - the dynamic half of a Netlify deploy.
3
3
  *
4
4
  * Every request that is NOT a static file in dist/ lands here: dynamic
5
5
  * pages (/sign, anything reading getContext() or $store()), /api routes,
6
6
  * and POST server actions. Static answers - prerendered documents, the
7
7
  * bundles, baked API bodies - are served by the CDN straight from dist/
8
8
  * (the `publish` directory) and never touch this code. That split is the
9
- * whole rosefd story: the static half costs zero function invocations.
9
+ * whole rosefc story: the static half costs zero function invocations.
10
10
  *
11
11
  * It reuses the framework's own edge adapter (the same Web-standard fetch
12
12
  * handler the edge adapter test exercises) over the built server bundle,
@@ -17,18 +17,18 @@
17
17
  * (`dist/**` in netlify.toml) carries dist/ into the bundle and the
18
18
  * adapter reads server.js / client.js from it at boot.
19
19
  *
20
- * Install: copy this file to <project>/netlify/functions/rosefd.ts and
20
+ * Install: copy this file to <project>/netlify/functions/rosefc.ts and
21
21
  * deploy/netlify.toml to <project>/netlify.toml, then push (or
22
22
  * `netlify deploy --prod`). In a project that depends on the published
23
23
  * package the import below becomes:
24
- * import { createEdgeHandler } from 'rosefd/edge';
24
+ * import { createEdgeHandler } from 'rosefc/edge';
25
25
  */
26
26
  import { createEdgeHandler } from '../../src/cli/edge.ts';
27
27
  import { fileURLToPath } from 'node:url';
28
28
 
29
29
  let handle: ((request: Request) => Promise<Response>) | null = null;
30
30
 
31
- export default async function rosefd(request: Request): Promise<Response> {
31
+ export default async function rosefc(request: Request): Promise<Response> {
32
32
  if (!handle) {
33
33
  handle = await createEdgeHandler(fileURLToPath(new URL('../../dist', import.meta.url)));
34
34
  }
@@ -13,5 +13,5 @@
13
13
  # redirect; the browser keeps its URL).
14
14
  [[redirects]]
15
15
  from = "/*"
16
- to = "/.netlify/functions/rosefd"
16
+ to = "/.netlify/functions/rosefc"
17
17
  status = 200
@@ -3,11 +3,11 @@
3
3
  "buildCommand": "npm run build",
4
4
  "outputDirectory": "dist",
5
5
  "functions": {
6
- "api/rosefd.ts": {
6
+ "api/rosefc.ts": {
7
7
  "includeFiles": "dist/**"
8
8
  }
9
9
  },
10
10
  "rewrites": [
11
- { "source": "/(.*)", "destination": "/api/rosefd" }
11
+ { "source": "/(.*)", "destination": "/api/rosefc" }
12
12
  ]
13
13
  }