@objectstack/runtime 1.0.6 → 1.0.7

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @objectstack/runtime@1.0.6 build /home/runner/work/spec/spec/packages/runtime
2
+ > @objectstack/runtime@1.0.7 build /home/runner/work/spec/spec/packages/runtime
3
3
  > tsup --config ../../tsup.config.ts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -10,13 +10,13 @@
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
- ESM dist/index.js 47.33 KB
14
- ESM dist/index.js.map 111.49 KB
15
- ESM ⚡️ Build success in 83ms
16
- CJS dist/index.cjs 49.07 KB
17
- CJS dist/index.cjs.map 111.59 KB
18
- CJS ⚡️ Build success in 84ms
13
+ ESM dist/index.js 47.89 KB
14
+ ESM dist/index.js.map 112.86 KB
15
+ ESM ⚡️ Build success in 69ms
16
+ CJS dist/index.cjs 49.63 KB
17
+ CJS dist/index.cjs.map 112.96 KB
18
+ CJS ⚡️ Build success in 75ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 10440ms
21
- DTS dist/index.d.ts 17.79 KB
22
- DTS dist/index.d.cts 17.79 KB
20
+ DTS ⚡️ Build success in 7169ms
21
+ DTS dist/index.d.ts 17.82 KB
22
+ DTS dist/index.d.cts 17.82 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @objectstack/runtime
2
2
 
3
+ ## 1.0.7
4
+
5
+ ### Patch Changes
6
+
7
+ - ebdf787: feat: implement standard service discovery via `/.well-known/objectstack`
8
+ - @objectstack/spec@1.0.7
9
+ - @objectstack/core@1.0.7
10
+ - @objectstack/types@1.0.7
11
+
3
12
  ## 1.0.6
4
13
 
5
14
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -354,6 +354,18 @@ var RestServer = class {
354
354
  handler: async (_req, res) => {
355
355
  try {
356
356
  const discovery = await this.protocol.getDiscovery({});
357
+ discovery.version = this.config.api.version;
358
+ if (discovery.endpoints) {
359
+ if (this.config.api.enableCrud) {
360
+ discovery.endpoints.data = `${basePath}${this.config.crud.dataPrefix}`;
361
+ }
362
+ if (this.config.api.enableMetadata) {
363
+ discovery.endpoints.metadata = `${basePath}${this.config.metadata.prefix}`;
364
+ }
365
+ if (discovery.endpoints.auth) {
366
+ discovery.endpoints.auth = `${basePath}/auth`;
367
+ }
368
+ }
357
369
  res.json(discovery);
358
370
  } catch (error) {
359
371
  res.status(500).json({ error: error.message });
@@ -776,6 +788,7 @@ var Runtime = class {
776
788
  // src/driver-plugin.ts
777
789
  var DriverPlugin = class {
778
790
  constructor(driver, driverName) {
791
+ this.type = "driver";
779
792
  this.version = "1.0.0";
780
793
  this.init = async (ctx) => {
781
794
  const serviceName = `driver.${this.driver.name || "unknown"}`;
@@ -797,6 +810,7 @@ var DriverPlugin = class {
797
810
  // src/app-plugin.ts
798
811
  var AppPlugin = class {
799
812
  constructor(bundle) {
813
+ this.type = "app";
800
814
  this.init = async (ctx) => {
801
815
  const sys = this.bundle.manifest || this.bundle;
802
816
  const appId = sys.id || sys.name;