mirror of
https://github.com/urbit/shrub.git
synced 2024-11-27 18:34:48 +03:00
npm/api: correct metadata resource interface
Fixes urbit/landscape#1035 Fixes urbit/landscape#1024
This commit is contained in:
parent
9980a60f7d
commit
2412564aa7
3946
package-lock.json
generated
3946
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
extends: '@urbit/eslint-config',
|
extends: '@urbit',
|
||||||
env: {
|
env: {
|
||||||
'jest': true
|
'jest': true
|
||||||
}
|
}
|
||||||
|
50616
pkg/interface/package-lock.json
generated
50616
pkg/interface/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,3 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
extends: "@urbit"
|
extends: '@urbit'
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { AppName, Path, Poke, uxToHex, PatpNoSig } from "../lib";
|
import { AppName, Path, Poke, uxToHex, PatpNoSig } from '../lib';
|
||||||
import { Association, Metadata, MetadataUpdate, MetadataUpdateAdd, MetadataUpdateRemove } from './types';
|
import { Association, Metadata, MetadataUpdate, MetadataUpdateAdd, MetadataUpdateRemove } from './types';
|
||||||
|
|
||||||
export const METADATA_UPDATE_VERSION = 1;
|
export const METADATA_UPDATE_VERSION = 1;
|
||||||
@ -18,13 +18,13 @@ export const add = (
|
|||||||
description: string,
|
description: string,
|
||||||
dateCreated: string,
|
dateCreated: string,
|
||||||
color: string,
|
color: string,
|
||||||
moduleName: string,
|
moduleName: string
|
||||||
): Poke<MetadataUpdateAdd> => metadataAction({
|
): Poke<MetadataUpdateAdd> => metadataAction({
|
||||||
add: {
|
add: {
|
||||||
group,
|
group,
|
||||||
resource: {
|
resource: {
|
||||||
resource,
|
resource,
|
||||||
app: appName
|
'app-name': appName
|
||||||
},
|
},
|
||||||
metadata: {
|
metadata: {
|
||||||
title,
|
title,
|
||||||
@ -52,7 +52,7 @@ export const remove = (
|
|||||||
group,
|
group,
|
||||||
resource: {
|
resource: {
|
||||||
resource,
|
resource,
|
||||||
app: appName
|
'app-name': appName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -70,11 +70,11 @@ export const update = (
|
|||||||
group: association.group,
|
group: association.group,
|
||||||
resource: {
|
resource: {
|
||||||
resource: association.resource,
|
resource: association.resource,
|
||||||
app: association.app
|
'app-name': association['app-name']
|
||||||
},
|
},
|
||||||
metadata
|
metadata
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
export { update as metadataUpdate };
|
export { update as metadataUpdate };
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { AppName, Path, Patp } from "../lib";
|
import { AppName, Path, Patp } from '../lib';
|
||||||
|
|
||||||
export type MetadataUpdate =
|
export type MetadataUpdate =
|
||||||
MetadataUpdateInitial
|
MetadataUpdateInitial
|
||||||
@ -31,13 +31,13 @@ export type MetadataUpdateRemove = {
|
|||||||
|
|
||||||
export interface MdResource {
|
export interface MdResource {
|
||||||
resource: string;
|
resource: string;
|
||||||
app: AppName;
|
'app-name': AppName;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MetadataUpdatePreview {
|
export interface MetadataUpdatePreview {
|
||||||
group: string;
|
group: string;
|
||||||
channels: Associations;
|
channels: Associations;
|
||||||
"channel-count": number;
|
'channel-count': number;
|
||||||
members: number;
|
members: number;
|
||||||
metadata: Metadata;
|
metadata: Metadata;
|
||||||
}
|
}
|
||||||
|
1623
pkg/npm/api/package-lock.json
generated
1623
pkg/npm/api/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -29,6 +29,10 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^15.12.5",
|
"@types/node": "^15.12.5",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.28.2",
|
||||||
|
"@typescript-eslint/parser": "^4.28.2",
|
||||||
|
"babel-eslint": "^10.1.0",
|
||||||
|
"eslint-plugin-react": "^7.24.0",
|
||||||
"onchange": "^7.1.0",
|
"onchange": "^7.1.0",
|
||||||
"typescript": "^4.3.2"
|
"typescript": "^4.3.2"
|
||||||
}
|
}
|
||||||
|
3706
pkg/npm/eslint-config/package-lock.json
generated
3706
pkg/npm/eslint-config/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
12110
pkg/npm/http-api/package-lock.json
generated
12110
pkg/npm/http-api/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user