npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tsl-apple-cloudkit

v0.2.33

Published

TypeScript library for Apple CloudKit JS

Downloads

82

Readme

Apple CloudKit TypeScript Library

TypeScript library with type declarations of Apple CloudKit JS v2. It downloads the CloudKit JS file automatically from the Apple CDN during NPM installation.

CodeQL Node.js npm license

Changes

Please note, that starting with v0.2.7 some elements break with the documentation by Apple. The following changes have been made:

  • Container.registerForNotifications actually returns a Promise

  • Use ContainerConfigLike, ClientContainerConfig, and ServerContainerConfig instead of ContainerConfig

  • Use FilterLike, RecordFieldFilter, and SystemFieldFilter instead of Filter

  • Use RecordLike, RecordReceived, RecordToChange, and RecordToCreate instead of Record

  • Share extends RecordReceived

  • Use SortDescriptorLike, RecordFieldSortDescriptor, and SystemFieldSortDescriptor instead of SortDescriptor

Requirements

This package is officially compatible with

  • CloudKit JS 2.0 and later

  • Node.js 16.0 and later (server)

  • RequireJS 2.0 and later (client)

  • TypeScript 3.0 and later (development)

Earlier versions might work as well, but do not receive updates anymore.

Installation & Update

npm i https://typescriptlibs.org/npm/tsl-apple-cloudkit.tgz

Configuration

On client side you can configure RequireJS to find the client handler, that has to be moved outside the NodeJS package:

require.config({
	paths: {
		'tsl-apple-cloudkit': 'lib/tsl-apple-cloudkit',
	}
});

Please note: If you do not create a bundle containing tsl-apple-cloudkit, the handler requires a static reference to CloudKit JS in the HTML head like this:

<script src="https://cdn.apple-cloudkit.com/ck/2/cloudkit.js"></script>

There are reports that CloudKit JS might not be compatible with the bundler of Angular v13 and later.

Usage

You can use the CloudKit JS library simply as a regular module:

import * as CloudKit from 'tsl-apple-cloudkit';

Or you reference the CloudKit JS declarations directly, when you use no modules:

/// <reference path="node_modules/tsl-apple-cloudkit/index.d.ts" />

Documentation

Further information can be found in the Apple CloudKit JS Documentation, Apple CloudKit JS Video, and Apple iCloud Development.

Use Apple CKTool JS and Apple CKTool JS Reference to manage CloudKit containers and databases.

Legal Notes

The downloaded index.js is licensed only for use to Apple developers in providing CloudKit Web Services, or any part thereof, and is subject to the iCloud Terms and Conditions and the Apple Developer Program License Agreement. You may not port this file to another platform inconsistent with the iCloud Terms and Conditions, the Apple Developer Program License Agreement, or the accompanying Documentation without Apple's written consent.

Acknowledgements: https://cdn.apple-cloudkit.com/ck/2/acknowledgements.txt