@junobuild/admin 0.0.45 → 0.0.46-next-2024-03-07.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.
@@ -4,9 +4,7 @@ export * from './services/releases.services';
4
4
  export * from './services/satellite.services';
5
5
  export type * from './types/actor.types';
6
6
  export type * from './types/build.types';
7
- export type * from './types/config.types';
8
7
  export type * from './types/controllers.types';
9
8
  export type * from './types/customdomain.types';
10
9
  export type * from './types/ic.types';
11
10
  export type * from './types/releases.types';
12
- export type * from './types/rules.types';
@@ -1,12 +1,11 @@
1
1
  import { Principal } from '@dfinity/principal';
2
+ import type { Rule, RulesType, SatelliteConfig } from '@junobuild/config';
2
3
  import type { Controller, MemorySize, SetControllersArgs } from '../../declarations/satellite/satellite.did';
3
4
  import type { SatelliteParameters } from '../types/actor.types';
4
5
  import type { BuildType } from '../types/build.types';
5
- import type { Config } from '../types/config.types';
6
6
  import type { CustomDomain } from '../types/customdomain.types';
7
- import type { Rule, RulesType } from '../types/rules.types';
8
7
  export declare const setConfig: ({ config: { storage: { headers: configHeaders, rewrites: configRewrites, redirects: configRedirects, iframe: configIFrame } }, satellite }: {
9
- config: Config;
8
+ config: Required<Pick<SatelliteConfig, 'storage'>>;
10
9
  satellite: SatelliteParameters;
11
10
  }) => Promise<void>;
12
11
  export declare const listRules: ({ type, satellite }: {
@@ -1,5 +1,5 @@
1
+ import type { MemoryText, PermissionText, Rule, RulesType } from '@junobuild/config';
1
2
  import type { Memory, Permission, Rule as RuleApi, RulesType as RulesTypeApi, SetRule } from '../../declarations/satellite/satellite.did';
2
- import type { MemoryText, PermissionText, Rule, RulesType } from '../types/rules.types';
3
3
  export declare const mapRuleType: (type: RulesType) => RulesTypeApi;
4
4
  export declare const mapSetRule: ({ read, write, memory, max_size, updated_at, mutablePermissions }: Pick<Rule, 'read' | 'write' | 'max_size' | 'updated_at' | 'memory' | 'mutablePermissions'>) => SetRule;
5
5
  export declare const mapRule: ([collection, rule]: [string, RuleApi]) => Rule;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junobuild/admin",
3
- "version": "0.0.45",
3
+ "version": "0.0.46-next-2024-03-07.1",
4
4
  "description": "A library for interfacing with admin features of Juno",
5
5
  "author": "David Dal Busco (https://daviddalbusco.com)",
6
6
  "license": "MIT",
@@ -51,10 +51,11 @@
51
51
  ],
52
52
  "homepage": "https://juno.build",
53
53
  "peerDependencies": {
54
- "@dfinity/agent": "^0.20.2",
55
- "@dfinity/identity": "^0.20.2",
56
- "@dfinity/principal": "^0.20.2",
54
+ "@dfinity/agent": "*",
55
+ "@dfinity/identity": "*",
56
+ "@dfinity/principal": "*",
57
+ "@junobuild/config": "*",
57
58
  "@junobuild/utils": "*",
58
- "semver": "7.*"
59
+ "semver": "*"
59
60
  }
60
- }
61
+ }
@@ -1,23 +0,0 @@
1
- export type StorageConfigSourceGlob = string;
2
- export interface StorageConfigHeader {
3
- source: StorageConfigSourceGlob;
4
- headers: [string, string][];
5
- }
6
- export interface StorageConfigRewrite {
7
- source: StorageConfigSourceGlob;
8
- destination: string;
9
- }
10
- export interface StorageConfigRedirect {
11
- source: StorageConfigSourceGlob;
12
- location: string;
13
- code: 301 | 302;
14
- }
15
- export interface StorageConfig {
16
- headers?: StorageConfigHeader[];
17
- rewrites?: StorageConfigRewrite[];
18
- redirects?: StorageConfigRedirect[];
19
- iframe?: 'deny' | 'same-origin' | 'allow-any';
20
- }
21
- export interface Config {
22
- storage: StorageConfig;
23
- }
@@ -1,13 +0,0 @@
1
- export type PermissionText = 'public' | 'private' | 'managed' | 'controllers';
2
- export type MemoryText = 'Heap' | 'Stable';
3
- export type RulesType = 'db' | 'storage';
4
- export interface Rule {
5
- collection: string;
6
- read: PermissionText;
7
- write: PermissionText;
8
- memory: MemoryText;
9
- created_at?: bigint;
10
- updated_at?: bigint;
11
- max_size?: number;
12
- mutablePermissions: boolean;
13
- }