@nteract/types
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -6,11 +6,6 @@ "use strict"; | ||
}); | ||
exports.makeKernelspecs = exports.makeKernelspec = exports.makeCommunicationKernelspecs = exports.createKernelspecsRef = undefined; | ||
exports.makeKernelspec = exports.makeCommunicationKernelspecs = undefined; | ||
var _immutable = require("immutable"); | ||
var _uuid = require("uuid"); | ||
var createKernelspecsRef = exports.createKernelspecsRef = function createKernelspecsRef() { | ||
return (0, _uuid.v4)(); | ||
}; | ||
var makeCommunicationKernelspecs = exports.makeCommunicationKernelspecs = (0, _immutable.Record)({ | ||
@@ -22,11 +17,8 @@ loading: false, | ||
var makeKernelspec = exports.makeKernelspec = (0, _immutable.Record)({ | ||
name: null, | ||
resources: (0, _immutable.Map)(), | ||
language: null, | ||
argv: (0, _immutable.List)(), | ||
env: (0, _immutable.Map)() | ||
}); | ||
var makeKernelspecs = exports.makeKernelspecs = (0, _immutable.Record)({ | ||
name: null, | ||
resources: (0, _immutable.Map)(), | ||
spec: makeKernelspec() | ||
env: (0, _immutable.Map)(), | ||
interrupt_mode: null | ||
}); |
@@ -6,4 +6,25 @@ "use strict"; | ||
}); | ||
exports.CommsRecord = exports.makeDocumentRecord = exports.makeAppRecord = exports.makeKernelspecs = exports.makeKernelspec = exports.makeCommunicationKernelspecs = exports.makeRemoteKernelRecord = exports.makeJupyterHostRecord = exports.makeDesktopHostRecord = exports.makeLocalKernelRecord = undefined; | ||
exports.CommsRecord = exports.makeDocumentRecord = exports.makeAppRecord = exports.makeKernelspec = exports.makeCommunicationKernelspecs = exports.makeRemoteKernelRecord = exports.makeJupyterHostRecord = exports.makeDesktopHostRecord = exports.makeLocalKernelRecord = exports.createKernelspecsRef = exports.createKernelRef = exports.createHostRef = undefined; | ||
var _refs = require("./refs"); | ||
Object.defineProperty(exports, "createHostRef", { | ||
enumerable: true, | ||
get: function get() { | ||
return _refs.createHostRef; | ||
} | ||
}); | ||
Object.defineProperty(exports, "createKernelRef", { | ||
enumerable: true, | ||
get: function get() { | ||
return _refs.createKernelRef; | ||
} | ||
}); | ||
Object.defineProperty(exports, "createKernelspecsRef", { | ||
enumerable: true, | ||
get: function get() { | ||
return _refs.createKernelspecsRef; | ||
} | ||
}); | ||
var _hosts = require("./hosts"); | ||
@@ -50,8 +71,2 @@ | ||
}); | ||
Object.defineProperty(exports, "makeKernelspecs", { | ||
enumerable: true, | ||
get: function get() { | ||
return _kernelspecs.makeKernelspecs; | ||
} | ||
}); | ||
@@ -58,0 +73,0 @@ var _immutable = require("immutable"); |
{ | ||
"name": "@nteract/types", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "collection of types for nteract components", | ||
@@ -5,0 +5,0 @@ "scripts": { |
// @flow | ||
import type { RecordFactory, RecordOf } from "immutable"; | ||
import { List, Map, Record } from "immutable"; | ||
import { v4 as uuid } from "uuid"; | ||
export opaque type KernelspecsRef = string; | ||
export const createKernelspecsRef = (): KernelspecsRef => uuid(); | ||
type CommunicationKernelspecsProps = { | ||
export type CommunicationKernelspecsProps = { | ||
loading: boolean, | ||
@@ -24,28 +19,22 @@ error: ?Object | ||
type KernelspecProps = { | ||
export type KernelspecProps = { | ||
name: ?string, | ||
resources: Map<string, *>, | ||
language: ?string, | ||
argv: List<string>, | ||
env: Map<string, *> | ||
env: Map<string, *>, | ||
interrupt_mode: ?string | ||
}; | ||
export type Kernelspecs = Map<string, RecordOf<KernelspecProps>>; | ||
export type Kernelspec = RecordOf<KernelspecProps>; | ||
export const makeKernelspec: RecordFactory<KernelspecProps> = Record({ | ||
name: null, | ||
resources: Map(), | ||
language: null, | ||
argv: List(), | ||
env: Map() | ||
env: Map(), | ||
interrupt_mode: null | ||
}); | ||
type KernelspecsProps = { | ||
name: ?string, | ||
resources: Map<string, *>, | ||
spec: RecordOf<KernelspecProps> | ||
}; | ||
export type Kernelspecs = RecordOf<KernelspecsProps>; | ||
export const makeKernelspecs: RecordFactory<KernelspecsProps> = Record({ | ||
name: null, | ||
resources: Map(), | ||
spec: makeKernelspec() | ||
}); |
@@ -13,4 +13,6 @@ /* @flow */ | ||
export type { HostRef, KernelspecsRef } from "./refs"; | ||
export type { HostRef, KernelRef, KernelspecsRef } from "./refs"; | ||
export { createHostRef, createKernelRef, createKernelspecsRef } from "./refs"; | ||
export { | ||
@@ -23,8 +25,10 @@ makeLocalKernelRecord, | ||
export { | ||
makeCommunicationKernelspecs, | ||
makeKernelspec, | ||
makeKernelspecs | ||
export type { | ||
CommunicationKernelspecsProps, | ||
KernelspecProps, | ||
Kernelspecs | ||
} from "./kernelspecs"; | ||
export { makeCommunicationKernelspecs, makeKernelspec } from "./kernelspecs"; | ||
/* | ||
@@ -31,0 +35,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
18692
576
1